Skip to content

Commit

Permalink
fix: respect --dest when copying static assets (close #909)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 3, 2018
1 parent 89982df commit 57ce32a
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/@vue/cli-service/lib/commands/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ module.exports = (api, options) => {

// respect inline build destination
if (args.dest) {
api.configureWebpack({
output: {
path: path.resolve(
api.service.context,
args.dest
)
const dest = path.resolve(
api.service.context,
args.dest
)
api.chainWebpack(config => {
config.output.path(dest)
if (args.target === 'app') {
config.plugin('copy').tap(args => {
args[0][0].to = dest
return args
})
}
})
}
Expand Down

0 comments on commit 57ce32a

Please sign in to comment.