Skip to content
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

Open
yogevyuval opened this issue Dec 1, 2018 · 3 comments
Open

Support webpack 4 #3

yogevyuval opened this issue Dec 1, 2018 · 3 comments

Comments

@yogevyuval
Copy link

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.

@yogevyuval
Copy link
Author

Actually you can just move it to be a peer dependency

@kopax
Copy link

kopax commented Jan 14, 2019

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

@parga
Copy link

parga commented May 31, 2019

@icopp @kopax can we please merge this ? Ive tested @kopax version in our application setup and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants