Replies: 2 comments 2 replies
-
这是dist文件
打包以后的css里面可以搜索 url(./assets/f1a45d7466ff780d.ttf) |
Beta Was this translation helpful? Give feedback.
2 replies
-
补充一下:dev情况下是正常的 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我的rspack的output
output: {
clean: true,
path: path.resolve(__dirname, 'dist'),
publicPath: isDev ? '/' : './', // 开发用 /,构建用 ./
filename: 'js/[name].js',
cssFilename: 'css/[name].css',
assetModuleFilename: 'assets/[hash][ext]',
},
module/rules/
{
test: /.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset',
}
打完包以后部署到服务器以后,发现这个字体前缀多了个css
我的字体加载而是变成了https://www.xxx.com/css/assets/ff18efd173a3b2c1.woff
图片地址是./assets/1800ba9ea80eb206.gif?1735046487103
Beta Was this translation helpful? Give feedback.
All reactions