mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-03-30 17:04:14 +08:00
Add mjs and jsx filename extensions to file-loader exclude pattern (#3537)
This commit is contained in:
committed by
Joe Haddad
parent
9af042263f
commit
af291f3cb6
@@ -223,7 +223,7 @@ module.exports = {
|
||||
// it's runtime that would otherwise processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.js$/, /\.html$/, /\.json$/],
|
||||
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
|
||||
loader: require.resolve('file-loader'),
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
|
||||
@@ -249,7 +249,7 @@ module.exports = {
|
||||
// it's runtime that would otherwise processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.js$/, /\.html$/, /\.json$/],
|
||||
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user