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
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Hello, I was having issues with this { test: /\.ts(x?)$/, include: /ClientApp/, use: 'babel-loader' }, in your webpack.config.js (It used to display errors when building minif. production files.).
I change it to { test: /\.js(x?)$/, include: /ClientApp/, use: 'babel-loader' }, and now it's working properly.
Shouldn't it be .js(x?)$: { test: /\.js(x?)$/, include: /ClientApp/, use: 'babel-loader' }, when we are using babel-loader instead of tsx?
Hope it makes sense.
Thank you
In the React templates in this repo, the source files are .tsx, so the Webpack config is correct as-is. You'd only change it to .jsx if you change your source file names. The fact that you're using babel-loader is not relevant to the loader rules - all that matters are the names of the actual files on disk.
Activity
SteveSandersonMS commentedon Feb 21, 2017
In the React templates in this repo, the source files are
.tsx, so the Webpack config is correct as-is. You'd only change it to.jsxif you change your source file names. The fact that you're usingbabel-loaderis not relevant to the loader rules - all that matters are the names of the actual files on disk.