-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1189 +/- ##
=======================================
Coverage 72.72% 72.72%
=======================================
Files 12 12
Lines 66 66
=======================================
Hits 48 48
Misses 18 18 Continue to review full report at Codecov.
|
Any thoughts on passing sassLoader options directly instead of through ie.
More info: webpack-contrib/sass-loader#285 (comment) |
Hi Nathan, I'm sorry I can not help you right now because of lack of time =/ I hope someone helps you! |
No worries man, and thanks. I can confirm this is working, I'll make a separate PR if it doesn't make it into the webpack upgrade. |
Very good! Good luck with this. |
I think you forgot an option for sass-loader
|
Also you missed to migrate from babel to webpack the ES2015 module resolution:
|
Any status on this? I have an upcoming project and I'd love to leverage this repo, but with webpack 2 :) |
Dedupe plugin is useless and |
It's works follow your codes, thx ;) @rauleite |
@@ -23,6 +23,7 @@ const karmaConfig = { | |||
browsers : ['PhantomJS'], | |||
webpack : { | |||
devtool : 'cheap-module-source-map', | |||
entry: './tests/test-bundler.js', |
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.
Should this be ./${project.dir_test}/test-bundler.js
like on line 11 of this file
What's the status on this? |
webpackConfig.plugins.push( | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NoErrorsPlugin() | ||
new webpack.NoEmitOnErrorsPlugin() | ||
) | ||
} else if (__PROD__) { | ||
debug('Enabling plugins for production (OccurenceOrder, Dedupe & UglifyJS).') | ||
webpackConfig.plugins.push( | ||
new webpack.optimize.OccurrenceOrderPlugin(), | ||
new webpack.optimize.DedupePlugin(), |
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.
Probably should remove the DedupePlugin? https://webpack.js.org/guides/migrating/#dedupeplugin-has-been-removed
}) | ||
] | ||
) | ||
|
||
// File loaders | ||
/* eslint-disable */ |
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 think we can eliminate the eslint-disable
; it was there for the compact loader definitions.
}) | ||
] | ||
) | ||
|
||
// File loaders | ||
/* eslint-disable */ |
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.
Less boilerplate:
const FONT_EXTS = new Map([
['woff', 'application/font-woff'],
['woff2', 'application/font-woff2'],
['otf', 'font/opentype'],
['ttf', 'application/octet-stream'],
['eot', 'application/vnd.ms-fontobject'],
['svg', 'image/svg+xml'],
]);
for (let [extension, mimeType] of FONT_EXTS) {
webpackConfig.module.rules.push({
test : new RegExp(`\\.${extension}(\\?.*)?$`),
loader : 'url-loader',
options : {
name : 'fonts/[name].[ext]',
limit : '10000',
mimetype : mimeType,
},
});
};
webpackConfig.module.rules.push(
{
test : /\.(png|jpg|gif)$/,
loader : 'url-loader',
options : {
limit : '8192',
},
},
);
Note addition of .gif
Also note that file-loader does not support limit
, so I assumed url-loader was intended.
I haven't tested this code yet.
query : project.compiler_babel | ||
}, { | ||
test : /\.json$/, | ||
loader : 'json' | ||
loader : 'json-loader' | ||
}] |
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.
Can eliminate this. JSON loader is built-in in Webpack 2.
delete loader.loaders | ||
webpackConfig.module.rules.filter(rule => | ||
rule.loader && /css/.test(rule.loader) | ||
).forEach(loader => { |
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.
isn't it a misspell here?
...
).forEach(rule => {
...
Moving to #1243. Thanks for your work, I'll try to cherry-pick some of your fixes over. I have private project that just recently bumped webpack to 2.0, so I'm currently porting all of those changes over here. |
Migration completed, as follows:
https://webpack.js.org/guides/migrating/
why?
https://medium.com/webpack/webpack-2-and-beyond-40520af9067f