Description
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
-
build the project with
npm run build
and browse theweb
directory: js files are copied in theassets/
subdirectory -
build the project with
npm run watch
(which is only an alias forvue-cli-service build --watch
in the package.json) and browse theweb
directory: js files are copied at the root of the directory, ignoring theassetsPath
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.