-
Notifications
You must be signed in to change notification settings - Fork 32
Migration to webpack 2 #324
Conversation
The only missing feature is the style loader
Enable source maps and trigger minififacion on loaders
| - `font` | ||
| - `image` | ||
| - `javaScript` | ||
| - `json` |
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.
Why should this be removed?
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 is no longer needed in webpack 2. They do it by default.
| // To ensure hashes are generated based on the file contents, use webpack-md5-hash plugin. | ||
| ...(action === actions.BUILD ? [new WebpackMd5Hash()] : []), | ||
|
|
||
| // Use "OccurrenceOrderPlugin" in order to make build deterministic. |
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’m assuming this are Webpack defaults now.
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.
Exactly!
| // Should first try to resolve loaders nested within Sagui. | ||
| // This fixes an issue in NPM v2 where webpack incorrectly | ||
| // thinks that the package `eslint` is the `eslint-loader` | ||
| modulesDirectories: [ |
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.
The comments points out to an npm 2 problem, but I imagine npm 2 is super deprecated at this point. Is this in general necessary?
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.
Good point, maybe we can update it. I think it is still a safe bet to be explicit about where to look for loaders.
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.
Fair enough, just updating the comment for now should do.
| use: [ | ||
| { | ||
| loader: 'file-loader', | ||
| options: { |
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.
Such readability, wow.
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.
hehe
No description provided.