-
Notifications
You must be signed in to change notification settings - Fork 364
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
Added support for node env provide plugin. #204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a node4 change + new ticket. After that, good to merge.
README.md
Outdated
@@ -59,6 +59,10 @@ You would change that to: | |||
``` | |||
Now you can just run your start script like normal, except now, you are awesome. Not that you weren't before. I'm just saying. More so. | |||
|
|||
### InspectPack and Node Environments | |||
|
|||
Webpack Dashboard does additional analysis of individual module sizes, asset sizes and any problems when your bundle is unminified and not in a production environment. The Webpack Plugin automatically adds `pathinfo = true` to your configuration’s output object. Environments are defined through the `DefinePlugin` with `process.env["NODE_ENV"]` being `"production"`. Webpack Dashboard will produce a warning if a production configuration is run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: s/asset sizes and/asset sizes, and/
plugin/index.js
Outdated
@@ -2,6 +2,7 @@ | |||
"use strict"; | |||
|
|||
const _ = require("lodash/fp"); | |||
const { get } = require("lodash"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh.
- This will break in
node4
which is supported. Can you file a ticket with a 1.0 milestone tag that is basically "CI: ensure code works in supported nodes". - For here, just remove and use
_
which is already in scope above.
For electron webpack dashboard we want to visually show differences when running in production and be more specific in webpack dashboard. This will be needed for FormidableLabs/electron-webpack-dashboard#33.
Addresses #197
DefinePlugin
exists and safely traverse the object to see if aproduction
NODE_ENV
variable is setcc @kenwheeler @ryan-roemer