Skip to content

Fix issue with webpack 4 #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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

kopax
Copy link

@kopax kopax commented Jan 14, 2019

No description provided.

@kopax
Copy link
Author

kopax commented Jan 14, 2019

Related to #2 and #3

@kopax
Copy link
Author

kopax commented Jan 14, 2019

A test package is 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),
    });

@parga
Copy link

parga commented May 16, 2019

can we have this merged ?

@kopax
Copy link
Author

kopax commented May 18, 2019

If you are interested I can release https://www.npmjs.com/package/@yeutech-lab/react-app-rewire-define-plugin in an open gh repository

@TizioFittizio
Copy link

Any news on this?

@ugohil-adobe
Copy link

I am also looking at this solution. Please merge or comment. How to fix this . Thank you 🙏

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

Successfully merging this pull request may close these issues.

4 participants