string-replace-loader-dev-options

0.3.1 • Public • Published

string-replace-loader-dev-options

npm npm downloads gitlab build gitlab coverage

Return string-replace-loader's option which is useful for development.

Read this in other languages: 日本語

Installation

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

Usage

If you want options for javascript, change your webpack.config.js like that:

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

Dependencies (1)

Dev Dependencies (19)

Package Sidebar

Install

npm i string-replace-loader-dev-options

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

11.7 kB

Total Files

5

Last publish

Collaborators

  • takahiro652c