0.1.3 • Published 5 years ago

lona-loader v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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',
+   }
  ],
}