-
Notifications
You must be signed in to change notification settings - Fork 75
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
Switch to webpack v3. #854
Conversation
|
||
module.exports = { | ||
/* webpack 4 |
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.
I believe it should be "webpack 3" - assuming this was left over
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.
There is some preliminary work to use webpack 4 that is commented out. I can remove it, but wanted to preserve it in some commit for when we move to webpack 4. Unfortunately, karma-webpack is not webpack 4 compatible yet.
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.
that is fine. I was just making sure.
/* webpack 4 | ||
mode: 'production', | ||
*/ | ||
performance: {hints: false}, |
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.
what does this do?
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.
It suppresses certain warning messages. Webpack, for instance, complains that the proj4 inclusion is large and could be broken into smaller modules, but we want proj4 as it stands, so this is not a useful warning. Rather than see this on every build, this turns those warnings off.
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.
thanks
}) | ||
], | ||
/* end webpack 3 */ | ||
/* webpack 4 |
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.
are we keeping commented code for the future work?
karma-base.js
Outdated
@@ -342,13 +360,17 @@ module.exports = function (config) { | |||
'jasmine', 'sinon' | |||
], | |||
webpack: { | |||
/* webpack 4 |
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.
same here.. I thought it should be 3
loader: 'istanbul-instrumenter' | ||
} | ||
]; | ||
karma_config.webpack.module.rules.unshift({ |
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.
what is the difference between preloaders vs unshift?
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.
looks like API change.
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.
unshift
just adds to the beginning of an array. There are no longer preloaders in webpack 3; you just need to order your loaders correctly. This places the loader first.
alias: base.resolve.alias | ||
}; | ||
|
||
module.exports = { | ||
/* webpack 4 |
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.
3?
@@ -19,6 +20,12 @@ var define_plugin = new webpack.DefinePlugin({ | |||
}); | |||
|
|||
module.exports = { | |||
/* webpack 4 |
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.
3 or 4, I would just check on it, not sure if this is intentional or left over comment that we forgot to update.
There are some sections for webpack v4 which are commented out (and some sections for v3 that would need to be removed). When karma-webpack v4 is official, we may want to switch to version 4.
There are some sections for webpack v4 which are commented out (and some sections for v3 that would need to be removed). When karma-webpack v4 is official, we may want to switch to version 4.