@bavary/webpack-loader

1.0.1 • Public • Published

Logo


Coverage Status Build Status Download count Current version Support me

Checkout related packages

Install via npm:

$ npm install -g @bavary/webpack-loader

Install via yarn:

$ yarn global add @bavary/webpack-loader

Usage

Create a new rule with @bavary/webpack-loader as loader:

module.exports = {
    // ...

    module: {
        rules: [
            {
                test: /\.bv$/,
                use: '@bavary/webpack-loader'
            }
        ]
    }

    // ...
};

Be sure to install the peer-dependency @bavary/core and optionally @bavary/bavary-lib if you want make use of the functions option.

Available options

const options =  {

    // Module type
    esModule: false,

    // Inject functions from @bavary/lib. Be sure to install @bavary/lib to use them
    functions: ['count', ...],

    ...bavaryOptions
}

where bavaryOptions are all options which can be used in the compiler configuration.

Example

./index.bv

entry ['A' | 'B']

./app.js

import parse from './index.bv';
console.log(parse('A')); // Logs "A"

Related packages

Package Sidebar

Install

npm i @bavary/webpack-loader

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

9.67 kB

Total Files

7

Last publish

Collaborators

  • simonwep