R
R
Reistline2018-06-20 19:31:50
Vue.js
Reistline, 2018-06-20 19:31:50

How to change paths to statics and scripts in vue-cli 3?

I assembled the project on vue-cli 3, in the latest version a lot has changed and there is no single config file. The fact is that I have two projects on the same domain, one of them is in the domain.ru/path/ subdirectory, and there is a problem in it. It lies in the fact that when building, vue-cli collects an html file with /path/path for images, css and js files, and I need to change these paths to ./path/path, otherwise they won’t load. I can’t find where do it. By default, the vue.config and webpack.config files are missing. To add your parameters, plugins to the default build settings, the documentation describes how to add the vue.config.js file. Unfortunately, I don't know how to fix the situation through it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Reistline, 2018-06-21
@Reistline

The problem was solved in vue.config.js added
module.exports = {
baseUrl: "."
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question