lona-loader

0.1.3 • Public • Published

Lona Webpack Loader

Import Lona Components as React components.

Installation

npm install -D lona-loader

Usage

The Lona Webpack loader should be added to the same rule as the on you use to compile your normal React components.

Let's say you have the following rule:

{
  test: /\.(m?jsx?)$/,
  exclude: /(node_modules)/,
  use: [
    {
      loader: 'babel-loader',
      options: {
        presets: ['@babel/preset-env', '@babel/preset-react'],
      },
    },
  ],
}

Then your config should become like this:

{
- test: /\.(m?jsx?)$/,
+ test: /\.(m?jsx?|component)$/,
  exclude: /(node_modules)/,
  use: [
    {
      loader: 'babel-loader',
      options: {
        presets: ['@babel/preset-env', '@babel/preset-react'],
      },
    },
+   {
+     loader: 'lona-loader',
+   }
  ],
}

Readme

Keywords

none

Package Sidebar

Install

npm i lona-loader

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

264 kB

Total Files

9

Last publish

Collaborators

  • mathieudutour