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

Not working #43

Closed
sm2017 opened this issue Jul 15, 2017 · 0 comments
Closed

Not working #43

sm2017 opened this issue Jul 15, 2017 · 0 comments

Comments

@sm2017
Copy link

sm2017 commented Jul 15, 2017

I have the following config

...

env : {
      dev : {
        NODE_ENV : 'development',
      },
      prod : {
        NODE_ENV : 'production',
      },
}
...

grunt.registerTask('myTest', 'Load constants', function() {
    console.log( process.env.NODE_ENV);
    const webpack = require('./webpack.config');
  });
grunt.registerTask('testEnv', ['env:prod','myTest']);

Whe I run grunt testEnv it log development not production, Why?

I have a webpack.config.js with const __DEV__ = process.env.NODE_ENV === 'development'; , it is always true and NODE_ENV is not set to production

@sm2017 sm2017 closed this as completed Aug 8, 2017
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

1 participant