Socket
Book a DemoInstallSign in
Socket

framework7-loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framework7-loader

Framework7 single-file component loader for Webpack

latest
Source
npmnpm
Version
3.0.2
Version published
Weekly downloads
9
200%
Maintainers
1
Weekly downloads
 
Created
Source

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>;
};

FAQs

Package last updated on 02 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts