framework7-loader

3.0.2 • Public • Published

Framework7 Component Loader

Webpack loader for Framework7 single file components

What is Framework7 Component Loader?

framework7-loader is a loader for webpack that allows you to author Framework7 Router components in a format called Single-File Components:

<!-- my-page.f7.html -->
<template>
  <div class="page">${msg}</div>
</template>

<script>
  export default () => {
    const msg = 'Hello world';

    return $render;
  };
</script>

Installation

npm i framework7-loader

Configuration

module.exports = {
  ...
  module: {
    rules: [
      ...
      {
        test: /\.f7.html$/,
        use: [
          'babel-loader',
          'framework7-loader',
        ],
      },

      ...
    ]
  }
  ...
}

JSX

Framework7 v6 single file components also support JSX:

<!-- my-page.f7.html -->
<script>
  export default () => {
    const msg = 'Hello world';

    return () => <div class="page">{msg}</div>;
  };
</script>
// my-page.f7.js

export default () => {
  const msg = 'Hello world';

  return () => <div class="page">{msg}</div>;
};

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.0-beta.20next
3.0.24latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.24
3.0.11
3.0.00
3.0.0-beta.30
3.0.0-beta.20
3.0.0-beta.10

Package Sidebar

Install

npm i framework7-loader

Weekly Downloads

5

Version

3.0.2

License

MIT

Unpacked Size

11.8 kB

Total Files

13

Last publish

Collaborators

  • nolimits4web