0.3.1 • Published 6 years ago

string-replace-loader-dev-options v0.3.1

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
6 years ago

string-replace-loader-dev-options

npm npm downloads gitlab build gitlab coverage

Webpackのloaderの1つであるstring-replace-loader の開発時に便利なオプションを返す。

Read this in other languages: Engulish

Installation

npm i -D string-replace-loader-dev-options

Usage

js用のオプションを使う場合、webpack.config.jsを次のようにしてください:

var stringReplaceLoaderDevOptions = require('string-replace-loader-dev-options');
module.exports = (env, argv) => {
  var isProd = argv.mode === 'production';
  return {
    // ...
    module: {
      rules: [
        {
          test: /\.js$/,
          use: [
            // other loaders
            // ...
            stringReplaceLoaderDevOptions.js({isProd: isProd})
          ]
        }
      ]
    }
  };
}

Available functions

License

MIT

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago