mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(webpack): use javascript/auto
for js rule (#9180)
This commit is contained in:
parent
db11f7bf93
commit
7955553070
@ -62,6 +62,7 @@ exports[`webpack nuxt webpack module.rules 1`] = `
|
||||
Object {
|
||||
\\"exclude\\": [Function exclude],
|
||||
\\"test\\": /\\\\.m?jsx?$/i,
|
||||
\\"type\\": \\"javascript/auto\\",
|
||||
\\"use\\": Array [
|
||||
Object {
|
||||
\\"loader\\": \\"<nuxtDir>/node_modules/babel-loader/lib/index.js\\",
|
||||
@ -674,6 +675,7 @@ exports[`webpack nuxt webpack module.rules test=.jsx 1`] = `
|
||||
"Object {
|
||||
\\"exclude\\": [Function exclude],
|
||||
\\"test\\": /\\\\.m?jsx?$/i,
|
||||
\\"type\\": \\"javascript/auto\\",
|
||||
\\"use\\": Array [
|
||||
Object {
|
||||
\\"loader\\": \\"<nuxtDir>/node_modules/babel-loader/lib/index.js\\",
|
||||
|
@ -330,6 +330,7 @@ export default class WebpackBaseConfig {
|
||||
},
|
||||
{
|
||||
test: /\.m?jsx?$/i,
|
||||
type: 'javascript/auto',
|
||||
exclude: (file) => {
|
||||
file = file.split(/node_modules(.*)/)[1]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user