You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@font-face {
font-family: 'SY-Bold';
src: url('/nbs-pc/comfonts/SourceHanSansCN-Bold.otf');
} @font-face {
font-family: 'SY-Regular';
src: url('/nbs-pc/comfonts/SourceHanSansCN-Regular.ttf');
} @font-face {
font-family: 'SY-Heavy';
src: url('/nbs-pc/comfonts/SourceHanSerifCN-Heavy-4.otf');
}
In the original project, this will not report an error. Now it is prompted that the module cannot be found
What is expected?
Ignore this part of the URL address
What is actually happening?
Module not found
The text was updated successfully, but these errors were encountered:
ht-sauce
changed the title
在public下面的静态资源css提示找不到模块
Vuecli5 the static resource CSS prompt under public cannot find the module
Dec 21, 2021
That is due to css-loader 4.0.0 breaking changes recorded at CHANGELOG.md# . It will try to resolve absolute urls now.
Look this thread issues/1153 too. In vue-cli context, you can reference to public assets with additional prefix like url('/public/img/.../a.png') .
Thank you. I used an alternative
Version
5.0.0-rc.1
Environment info
Steps to reproduce
@font-face {
font-family: 'SY-Bold';
src: url('/nbs-pc/comfonts/SourceHanSansCN-Bold.otf');
}
@font-face {
font-family: 'SY-Regular';
src: url('/nbs-pc/comfonts/SourceHanSansCN-Regular.ttf');
}
@font-face {
font-family: 'SY-Heavy';
src: url('/nbs-pc/comfonts/SourceHanSerifCN-Heavy-4.otf');
}
In the original project, this will not report an error. Now it is prompted that the module cannot be found
What is expected?
Ignore this part of the URL address
What is actually happening?
Module not found
The text was updated successfully, but these errors were encountered: