Font path problem referenced by Vue@font-face

defining the resources referenced by @ font-face "s src in vue component"s style will have a path problem. After build, the font resource path will be relative to the static/css/ directory, and I want it to be relative to the dist/ directory

.

my project directory structure

<br>dist/<br>|          static/<br>|          |            css/<br>|          |            fonts/<br>|          |            |            FZY3JW.3b9060e.ttf     <br>|          |            js/<br>|          index.html<br>src<br>|          assets/<br>|          |              FZY3JW.ttf<br>|          app.vue<br>

this is a reference to the font
c4e56e4a60f8c9120cfe9862bb9a8cd4ca64115a.jpg

npm run dev

npm run buildindex.html
e28ce3ec538b021ad57d2ae6f93511cb9c02de17_1_690x25.jpg

webpackloader
426938551a1ebc4e46b415c92ff800d89e40af2b.jpg

Mar.14,2021

refer to this answer
the relative path in the separately extracted css makes the same sense.

Menu