代码拉取完成,页面将自动刷新
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;
// }
},
}
}
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。