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
Please tell us about your environment:
OSX 10.12.3
Current behavior:
babel-loader crashes when no options are supplied:
Module build failed: TypeError: Cannot read property 'babelrc' of null
Expected/desired behavior:
Supplying no options should be supported.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
{test: /\.js$/,use: 'babel-loader',// don't pass any options to the loader}
The issue is that loader-utils' getOptions returns null if no options are supplied to the loader, so you can't access properties assuming that it will be an object. Appending || {} to L96 should fix it, but I haven't had a chance to verify.
The text was updated successfully, but these errors were encountered:
I'm submitting a bug report
Webpack Version:
2.2.1
Babel Core Version:
6.23.1
Babel Loader Version:
7.0.0-alpha.2
Please tell us about your environment:
OSX 10.12.3
Current behavior:
babel-loader crashes when no options are supplied:
Expected/desired behavior:
Supplying no options should be supported.
The issue is that loader-utils'
getOptions
returnsnull
if no options are supplied to the loader, so you can't access properties assuming that it will be an object. Appending|| {}
to L96 should fix it, but I haven't had a chance to verify.The text was updated successfully, but these errors were encountered: