After dev.assetPrefix is configured, why do I still access static files in the root directory instead of the corresponding assetPrefix path #3586
Answered
by
FugitiveLc
FugitiveLc
asked this question in
Q&A
-
我的rsbuild.config.js文件如下 import { defineConfig } from '@rsbuild/core';
import { pluginVue2 } from '@rsbuild/plugin-vue2';
export default defineConfig({
plugins: [pluginVue2()],
dev:{
assetPrefix:'/client/'
},
source:{
entry:{
index: './src/main.js'
}
}
}); 在我的项目根路径下有一个test.txt 文件 当我使用vue-cli5创建项目 并配置 publicPath: '/client/' 时 是可以 用这个 localhost:3000/client/test.txt 路径是访问到对应的文件的 |
Beta Was this translation helpful? Give feedback.
Answered by
FugitiveLc
Sep 28, 2024
Replies: 2 comments
-
文件结构如下 |
Beta Was this translation helpful? Give feedback.
0 replies
-
应该是需要这个配置 #3542 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
FugitiveLc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
应该是需要这个配置 #3542