feat: 配置了插件动态导入,新增了一个完成度不高的代码编辑插件
This commit is contained in:
1 parent
803fd69850
commit
86b3a02237
9 files changed
+414
-35
No files matched your search
+18
-7
@@ -1,11 +1,15 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
import { viteSingleFile } from 'vite-plugin-singlefile'
|
||||
// import { viteSingleFile } from 'vite-plugin-singlefile'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue(), viteSingleFile()],
|
||||
base: './',
|
||||
plugins: [
|
||||
vue()
|
||||
// viteSingleFile()
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src')
|
||||
@@ -59,11 +63,18 @@ export default defineConfig({
|
||||
},
|
||||
output: {
|
||||
// 配置输出为单文件
|
||||
inlineDynamicImports: true,
|
||||
manualChunks: undefined,
|
||||
entryFileNames: 'bundle.js',
|
||||
format: 'iife', // 立即执行函数格式
|
||||
name: 'MyBundle'
|
||||
// inlineDynamicImports: true,
|
||||
// manualChunks(id) {
|
||||
// if (id.includes('node_modules')) {
|
||||
// return 'vendor'
|
||||
// }
|
||||
// if (id.includes('@codemirror')) {
|
||||
// return 'codemirror'
|
||||
// }
|
||||
// },
|
||||
// entryFileNames: 'bundle.js',
|
||||
// format: 'iife', // 立即执行函数格式
|
||||
// name: 'MyBundle'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user