-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support webpack 4 #3
Comments
Actually you can just move it to be a peer dependency |
A test package has been released: $ npm install @yeutech-lab/react-app-rewire-define-plugin --save-dev In your code: const rewireDefinePlugin = require('@yeutech-lab/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),
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.GA_TRACKING_ID': JSON.stringify(process.env.GA_TRACKING_ID),
}); Waiting PR to be merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using this plugin inside a project that uses Webpack 4 (like CRA 2) causes a compilation error, because of webpack versions mismatch.
Please support webpack 4, or dont force importing webpack 4.
The text was updated successfully, but these errors were encountered: