feat(webpack): add mjs to babel-loader (#7178)

This commit is contained in:
Xin Du (Clark) 2020-04-05 14:41:21 +01:00 committed by GitHub
parent 21b39fc701
commit 16b9c157bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ exports[`webpack nuxt webpack module.rules 1`] = `
},
Object {
\\"exclude\\": [Function exclude],
\\"test\\": /\\\\.jsx?$/i,
\\"test\\": /\\\\.m?jsx?$/i,
\\"use\\": Array [
Object {
\\"loader\\": \\"<nuxtDir>/node_modules/babel-loader/lib/index.js\\",
@ -636,7 +636,7 @@ exports[`webpack nuxt webpack module.rules loader=vue- 1`] = `
exports[`webpack nuxt webpack module.rules test=.jsx 1`] = `
"Object {
\\"exclude\\": [Function exclude],
\\"test\\": /\\\\.jsx?$/i,
\\"test\\": /\\\\.m?jsx?$/i,
\\"use\\": Array [
Object {
\\"loader\\": \\"<nuxtDir>/node_modules/babel-loader/lib/index.js\\",

View File

@ -271,7 +271,7 @@ export default class WebpackBaseConfig {
]
},
{
test: /\.jsx?$/i,
test: /\.m?jsx?$/i,
exclude: (file) => {
file = file.split('node_modules', 2)[1]