0.1.0 • Published 5 years ago

inject-config-loader v0.1.0

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

inject-config-loader

Build Status

inject config into webpack bundle

Install

yarn add -D inject-config-loader

Usage

// webpack.config.js

module.exports = {
  // ...
  resolve: {
    alias: {
      config: path.join(__dirname, 'source/dummy.config')
    }
  },
  module: {
    rules: [
      {
        test: /\.config$/,
        use: [
          {
            loader: 'inject-config-loader',
            options: {
              field: 'front'
            }
          }
        ]
      }
    ]
  },
  // ...
}

Options

field (string)

Name of a config property that will be injected. By default whole config is injected.

cache (bool)

Default value: true (recommended for production). If false, all changes in config files will trigger an incremental build.

Example

See sample webpack.config.js in demo folder.

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

6 years ago