1 Star 0 Fork 0

小林子/otp-manager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
小林子 提交于 2025-03-27 17:06 +08:00 . 1
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig({
plugins: [vue()],
base: './',
build: {
outDir: 'dist',
rollupOptions: {
input: {
main: path.resolve(__dirname, 'pop/index.html'),
background: path.resolve(__dirname, 'background/background.ts'),
options: path.resolve(__dirname, 'options/index.html')
},
output: {
entryFileNames: ({ facadeModuleId, isEntry }) => {
const file = facadeModuleId || '';
const dir = path.dirname(file).split('/');
const lastDir = dir[dir.length - 1];
const name = path.basename(file, path.extname(file)); // notes;
return `${lastDir}/${name}.js`;
},
// assetFileNames: (val) => {
// const name = path.basename(val.name || ''); // notes;
// console.log('aaaaaaaa', name)
// return "a" + name;
// },
// chunkFileNames: (val) => {
// const name = path.basename(val.name || ''); // notes;
// return "a" + name;
// }
},
}
}
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/lsl52640/otp-manager.git
git@gitee.com:lsl52640/otp-manager.git
lsl52640
otp-manager
otp-manager
master

搜索帮助