Vue3+Vite,vite.config.js内容为:
[JavaScript] 纯文本查看 复制代码 import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({
base: './',
plugins: [vue()],
build: {
rollupOptions: {
input: {
popup: resolve(__dirname, 'src/popup/popup.html')
},
output: {
dir: 'dist',
assetFileNames: '[name]/[name].[ext]',
chunkFileNames: 'js/[name].js',
entryFileNames: e => `${e.name}/[name].js`
}
}
}
})
以上代码,build后,输出3个文件,分别是
vite v4.5.0 building for production...
✓ 1383 modules transformed.
dist/src/popup/popup.html
dist/popup/popup.css
dist/popup/popup.js
问题:如果我希望popup.html文件的输出路径改为dist/popup/popup.html,应该怎么写?
|