Skip to content

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