JSPM

  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q47349F
  • License MIT

This package contains shareable webpack configuration used by the applications created with @shaizei/cli.

Package Exports

  • @shaizei/webpack-config
  • @shaizei/webpack-config/config/webpack.base

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shaizei/webpack-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@shaizei/webpack-config

This package contains shareable webpack configuration used by the applications created with @shaizei/cli.

Getting Started

1. Installation

Using Yarn:

  yarn add @shaizei/webpack-config webpack webpack-dev-server webpack-cli --dev

Using npm:

  npm install @shaizei/webpack-config webpack webpack-dev-server webpack-cli --save-dev

2. Usage

  • Create a new webpack.config.js at the root directory of your project.
  • Import the config function from @shaizei/webpack-config package.
  const WebpackConfig = require('@shaizei/webpack-config');
  • Then, we just need to export the configurations.
  module.exports = WebpackConfig();

Override Default Config

If you want to override some of the pre-defined configuration, then simply pass a JavaScript object into WebpackConfig as follows:

module.exports = WebpackConfig({
  plugins: [...]
});