Closed armno closed 5 years ago
Describe the bug In config/webpack.loaders.js, line 19, the test regex matches only .jsx but not .js files.
config/webpack.loaders.js
test
.jsx
.js
x should be optional with ? to match both .js and .jsx files.
x
?
- /\.js(x)$/ + /\.js(x)?$/ // or something like + /\.jsx?$/ + /\.(js|jsx)$/
(taken from https://github.com/kriasoft/react-starter-kit/blob/master/tools/webpack.config.js#L29)
tested with https://www.regextester.com/
To Reproduce Steps to reproduce the behavior:
$ npm install
$ npm start
loader
babel-loader
dumbbell-loader
Expected behavior webpack-dev-server should display an error of the invalid loader, which means the source file scripts.js get processed.
scripts.js
Screenshots (of the expected behavior)
Desktop (please complete the following information):
Additional context .js files are included in the bundle but they are not transpiled with babel-loader
✌️
Good catch, i'll get this updated ASAP. Thanks!
Describe the bug In
config/webpack.loaders.js
, line 19, thetest
regex matches only.jsx
but not.js
files.x
should be optional with?
to match both.js
and.jsx
files.(taken from https://github.com/kriasoft/react-starter-kit/blob/master/tools/webpack.config.js#L29)
tested with https://www.regextester.com/
To Reproduce Steps to reproduce the behavior:
$ npm install
$ npm start
config/webpack.loaders.js
, line 23, changeloader
frombabel-loader
to an invalid loader name, for example:dumbbell-loader
Expected behavior webpack-dev-server should display an error of the invalid loader, which means the source file
scripts.js
get processed.Screenshots (of the expected behavior)
Desktop (please complete the following information):
Additional context
.js
files are included in the bundle but they are not transpiled withbabel-loader
✌️