0.4.0 • Published 5 years ago

webpack-build-linked-packages v0.4.0

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

Webpack Build Linked Packages

npm

A webpack plugin that runs a build script for any symlinked packages in node_modules (e.g. via npm link or yarn link).

This can be handy when testing local changes to a package that has a build step (e.g. for stripping type annotations, or transpiling syntax with Babel). It can be easy to forget to rebuild the local package after each code change – instead you can install this plugin, and have the local package automatically rebuilt on each webpack compile.

Installation

npm install webpack-build-linked-packages --save-dev

Usage

In your webpack config, require the plugin then add an instance to the plugins array.

const WebpackBuildLinkedPackages = require("webpack-build-linked-packages");

module.exports = {
  plugins: [
    new WebpackBuildLinkedPackages({
      // Options go here
    })
  ]
};

Options (read the schema)

scriptName

Type: string

Default: build

The NPM script to run in all linked packages. If the script is defined in the linked package, it will be invoked with npm run-script.