@bit/loader-js

1.2.3 • Public • Published

bit-loader-js

Greenkeeper badge

bit-loader plugin for processing JavaScript dependencies with cjs and import syntax

by default, bit-loader-js will only process require and import syntax. You can optionally enable amd syntax.

Options

  • amd: boolean. defaults to false. Flag to enable/disable amd syntax
  • cjs: boolean. defaults to true. Flag to enable/disable cjs syntax

Example

Plugin configuration with bit-bundler

var BitBundler = require("@bit/bundler");
var jsPlugin = require("@bit/loader-js");

var bundler = new Bitbundler({
  loader: {
    plugins: [
      jsPlugin()
    ]
  }
});

With amd syntax enabled

var BitBundler = require("@bit/bundler");
var jsPlugin = require("@bit/loader-js");

var bundler = new Bitbundler({
  loader: {
    plugins: [
      jsPlugin({
        amd: true
      })
    ]
  }
});

Install

$ npm install @bit/loader-js --save

License

Licensed under MIT

Package Sidebar

Install

npm i @bit/loader-js

Weekly Downloads

1

Version

1.2.3

License

MIT

Unpacked Size

4.52 kB

Total Files

7

Last publish

Collaborators

  • manchagnu