mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 20:08:41 -05:00
fix: fix file name resovling in mocha env
This commit is contained in:
@@ -15,6 +15,12 @@ module.exports = api => {
|
||||
options.optimizeSSR = false
|
||||
return options
|
||||
})
|
||||
|
||||
const isLegacyBundle = process.env.VUE_CLI_MODERN_MODE && !process.env.VUE_CLI_MODERN_BUILD
|
||||
// mocha-webpack cannot deal with the query parameter in filename
|
||||
webpackConfig
|
||||
.output
|
||||
.filename(isLegacyBundle ? '[name]-legacy.js?' : '[name].js')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user