You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so shouldn't be included in builds. Webpack at least claims to support that field, so it should not be visited here.
because devDependencies are not installed with this command without explicitly using the --dev flag.
This isn't technically true. By default, npm does install devDependencies: it's likely that you have NODE_ENV=production set globally, which is relatively uncommon.
npm install "$package"
In that case, you normally don't want the development dependencies, so you just get what is needed to use the package: dependencies.
If you really want to install development packages in that case, you can set the dev config option to true, possibly from the command line as:
npm install "$package" --dev
The option is false by default since this is a much less common case.
Activity
tmcw commentedon Sep 20, 2016
Two issues layered here:
mapbox-gl-js/package.json
Line 89 in 07feb8d
This isn't technically true. By default,
npmdoes install devDependencies: it's likely that you haveNODE_ENV=productionset globally, which is relatively uncommon.Are you using something similar to the suggested webpack configuration?
DannyDelott commentedon Sep 20, 2016
Thanks, we are using the suggested webpack config (it's great!) and haven't configured a production env yet, so that hasn't happened yet.
Are you sure about devDependencies? According to this answer on SO:
mourner commentedon Sep 20, 2016
@tmcw
npm installin a mapbox-gl dir installs dev deps of mapbox-gl, butnpm install mapbox-glin a different dir does not.@DannyDelott would this solution be acceptable to you?
DannyDelott commentedon Sep 20, 2016
@mourner I need
sinonin my project anyway, so this is a motivation to refactor some home-rolled spies now instead of needing a workaround.Just wanted to document it here in case others aren't using
sinonand have trouble with the new release.