Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
example
src
README.md
package.json

README.md

interlock-browserify-transforms

Used to apply Browserify transforms to your source modules.

Usage

Make sure you have installed the plugin as a dependency in your project:

$ npm install --save-dev interlock-browserify-transforms

Then, include it in your config:

const browserifyTransforms = require("interlock-browserify-transforms");

module.exports = {
  // ... config options
  plugins: [
    browserifyTransforms([
      // ... transforms definitions here
    ])
    // .. other plugins
  ]
};

Definitions

This plugin takes a single argument: an array of definitions. These definitions can take the following forms:

  • string: Assumed to be a transform in the form of a require-able module.
  • function: A valid browserify transform.
  • object: An object with some or all of the following options:
    • transform: (required) A valid browserify transform.
    • opts: (optional) Options to pass to the browserify transform.
    • filter: (optional) A regular expression, used to filter source files on which the transform will operate.
    • moduleType: (optional) The target Interlock module type (e.g. css). This setting can be used for interoperability with Interlock plugins that expect it.