Skip to content

Commit

Permalink
fix: fix file name resovling in mocha env
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Sep 10, 2018
1 parent 52dbdf8 commit f683583
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@vue/cli-plugin-unit-mocha/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
})

Expand Down

0 comments on commit f683583

Please sign in to comment.