V
V
Vadim Sutormin2020-09-17 06:53:12
webpack
Vadim Sutormin, 2020-09-17 06:53:12

How to set file paths when building a vue-cli-service project?

There is a project on vue.js, I work in PHPStorm IDE. I build the project with the vue-cli-service build command (written in package.json - "build": "vue-cli-service build"). When building, everything falls into the dist directory (by default) and the paths to styles and scripts, respectively, are written relative to the index.html file to the css and js folders. That is something like:

<link href=/css/app.0d3ea108.css rel=preload as=style>

But deployment is configured so that from the dist directory it is loaded into the calc folder on the server. How to make it so that when building a project, the paths are written as:
<link href=/calc/css/app.0d3ea108.css rel=preload as=style>

Help, I can’t find information, and I’m already tired of redoing the paths with my hands.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2020-09-17
@Wunder

publicpath

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question