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

assetsPath config option ignored when building with --watch #3767

Closed
halfpastfive opened this issue Apr 7, 2019 · 0 comments · Fixed by #4323
Closed

assetsPath config option ignored when building with --watch #3767

halfpastfive opened this issue Apr 7, 2019 · 0 comments · Fixed by #4323

Comments

@halfpastfive
Copy link

Version

3.5.5

Reproduction link

https://github.com/halfpastfive/assetspath

Environment info


Environment Info:

  System:
    OS: Linux 4.18 KDE neon 5.15
    CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  Binaries:
    Node: 10.15.3 - /usr/bin/node
    Yarn: Not Found
    npm: 6.4.1 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 66.0.2
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0-beta.3 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0-beta.3 
    @vue/babel-preset-app:  3.5.5 
    @vue/babel-preset-jsx:  1.0.0-beta.3 
    @vue/babel-sugar-functional-vue:  1.0.0-beta.3 
    @vue/babel-sugar-inject-h:  1.0.0-beta.3 
    @vue/babel-sugar-v-model:  1.0.0-beta.3 
    @vue/babel-sugar-v-on:  1.0.0-beta.3 
    @vue/cli-overlay:  3.5.1 
    @vue/cli-plugin-babel: ^3.5.0 => 3.5.5 
    @vue/cli-plugin-eslint: ^3.5.0 => 3.5.1 
    @vue/cli-service: ^3.5.0 => 3.5.3 
    @vue/cli-shared-utils:  3.5.1 
    @vue/component-compiler-utils:  2.6.0 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.2 
    vue: ^2.6.6 => 2.6.10 
    vue-eslint-parser:  2.0.3 
    vue-hot-reload-api:  2.3.3 
    vue-loader:  15.7.0 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.5.21 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
  npmGlobalPackages:
    @vue/cli: 3.5.5

Steps to reproduce

in the example project, outputDir and assetsDir are defined in vue.config.js

  1. build the project with npm run build and browse the web directory: js files are copied in the assets/ subdirectory

  2. build the project with npm run watch (which is only an alias for vue-cli-service build --watch in the package.json) and browse the web directory: js files are copied at the root of the directory, ignoring the assetsPath option of the vue.config.js

What is expected?

assets are copied in the directory defined by the assetsPath option from the vue.config.js file

What is actually happening?

assets are copied in the directory defined by the outputPath directory, ignoring the assetsPath option


In my real-world use case, the html files are templates for a server-side application. In this application, assets need to be in a subfolder in order to be considered as assets by our server.

Without it, I need to build for production, making debugging more difficult.

haoqunjiang added a commit that referenced this issue Jul 21, 2019
BREAKING CHANGE:
Changing directory strcuture, though now becoming more intuitive, may
still break users' workflows, so it's considered a breaking change.

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

Successfully merging a pull request may close this issue.

1 participant