feat: change center-component to components
This commit is contained in:
@@ -21,10 +21,11 @@ if (!isDev) {
|
||||
|
||||
plugins.push(tailwindcss());
|
||||
const devBackend = 'https://kevisual.silkyai.cn';
|
||||
const meBackend = 'https://kevisual.xiongxiao.me';
|
||||
// const meBackend = 'https://kevisual.xiongxiao.me';
|
||||
const meBackend = 'https://kevisual.cn';
|
||||
// const backend = isDev ? devBackend : meBackend;
|
||||
const backendWss = devBackend.replace(/^https:/, 'wss:');
|
||||
const backend = devBackend;
|
||||
const backend = meBackend;
|
||||
let proxy = {};
|
||||
if (true) {
|
||||
proxy = {
|
||||
@@ -46,6 +47,15 @@ if (true) {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function processImageName(fileName: string): string {
|
||||
if (fileName.includes('panda')) {
|
||||
return fileName; // 保留原名
|
||||
}
|
||||
// 其他图片文件名处理逻辑
|
||||
return `${fileName}.jpg`; // 示例:添加后缀
|
||||
}
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), ...plugins],
|
||||
@@ -62,6 +72,21 @@ export default defineConfig({
|
||||
DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development'),
|
||||
},
|
||||
base: isDev ? '/' : '/root/center/',
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// 控制输出
|
||||
// 在rollup里面, hash代表将你的文件名和文件内容进行组合计算得来的结果
|
||||
assetFileNames: (chunkInfo) => {
|
||||
console.log(chunkInfo.names);
|
||||
if (chunkInfo.names?.includes('panda.png')) {
|
||||
return '[name].[ext]';
|
||||
}
|
||||
return '[name].[hash].[ext]';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 6020,
|
||||
host: '0.0.0.0',
|
||||
|
||||
Reference in New Issue
Block a user