Open halton opened 6 years ago
FAQ You need to setup relative path during build. Follow these steps:
assetsPublicPath: '/'
to assetsPublicPath: './'
Unfortunately, I failed in both cases:
config/index.js
file on a clean new created VUE repo, https://github.com/halton/vue-test config/index.js
in another old repo, but your FAQ does not help in advance.Well the config/index.js is only available in some template of vue-cli. You could change the path yourself in index.html file to reference correct assets.
Still very confused, could you go to the repo https://github.com/halton/vue-test and ponit me which file should change? This repo is zero change after crating with vue create
.
Okay you can create vue.config.js
file in root of your project. Then insert following line:
module.exports = {
baseUrl: '/vue-test/',
}
From Official vue-cli docs:
Project deployment base By default we assume your app will be deployed at the root of a domain, e.g. https://www.my-app.com/ If your app is deployed at a sub-path, you will need to specify that sub-path here. For example, if your app is deployed at https://www.foobar.com/my-app/ then change this to '/my-app/'
Environment:
Steps:
Expected result: