Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-cli-service build --dest #909

Closed
ghost opened this issue Mar 1, 2018 · 1 comment
Closed

vue-cli-service build --dest #909

ghost opened this issue Mar 1, 2018 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Mar 1, 2018

Version

3.0.0-beta.2

Steps to reproduce

Run
./node_modules/.bin/vue-cli-service build --dest static

What is expected?

All files in static dir

What is actually happening?

public/favicon.ico copied to default folder (dist)


Trying to move compiled files to another dir in my fresh project, but favicon.ico appears in ./dist.

P.S.: So, what link should i provide?

@LinusBorg
Copy link
Member

LinusBorg commented Mar 1, 2018

Seems we have to overwrite options.outPutDir here

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/commands/build/index.js#L60-L69

    if (args.dest) {
+      const path = path.resolve(
+        api.service.context,
+        args.dest
+      )
+      options.outPutDir = path
      api.configureWebpack({
+         output: path
-        output: {
-          path: path.resolve(
-            api.service.context,
-            args.dest
          )
        }
      })
    }

...because the copy webpack plugin uses options.outputDir to set the directory to copy to when the webpack config is resolved later in the build script:

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/app.js#L151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants