Skip to content
Add webpack.DefinePlugin to a react-app-rewired config.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode First commit Sep 22, 2017
.editorconfig First commit Sep 22, 2017
.eslintrc First commit Sep 22, 2017
.gitignore Initial commit Sep 22, 2017
.prettierrc First commit Sep 22, 2017
LICENSE Initial commit Sep 22, 2017
README.md Use local package.json file Oct 13, 2017
index.js First commit Sep 22, 2017
package-lock.json Add package-lock Sep 22, 2017
package.json First commit Sep 22, 2017

README.md

react-app-rewire-define-plugin

Add webpack.DefinePlugin to a react-app-rewired config.

const rewireDefinePlugin = require('react-app-rewire-define-plugin')

// Use `webpack.DefinePlugin` to add the version number from package.json
config = rewireDefinePlugin(config, env, {
  'process.env.VERSION': JSON.stringify(require('./package.json').version)
})
You can’t perform that action at this time.