mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 11:59:41 +08:00
v3.8.1发布,上传前端代码
This commit is contained in:
34
jeecgboot-vue3/build/vite/plugin/electron.ts
Normal file
34
jeecgboot-vue3/build/vite/plugin/electron.ts
Normal file
@ -0,0 +1,34 @@
|
||||
// import electron from 'vite-plugin-electron/simple'
|
||||
//
|
||||
// export function configElectronPlugin(_viteEnv: ViteEnv, isBuild: boolean) {
|
||||
// return electron({
|
||||
// main: {
|
||||
// // 主进程入口
|
||||
// entry: 'electron/main.ts',
|
||||
// vite: {
|
||||
// build: {
|
||||
// sourcemap: !isBuild,
|
||||
// outDir: 'dist/electron',
|
||||
// },
|
||||
// },
|
||||
// onstart: ({startup}) => {
|
||||
// // 开发热重载
|
||||
// startup()
|
||||
// },
|
||||
// },
|
||||
// preload: {
|
||||
// input: 'electron/preload/index.ts',
|
||||
// vite: {
|
||||
// build: {
|
||||
// sourcemap: !isBuild,
|
||||
// outDir: 'dist/electron/preload',
|
||||
// },
|
||||
// },
|
||||
// onstart: ({startup}) => {
|
||||
// // 开发热重载
|
||||
// startup()
|
||||
// },
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// }
|
||||
@ -16,6 +16,8 @@ import { configVisualizerConfig } from './visualizer';
|
||||
import { configThemePlugin } from './theme';
|
||||
import { configSvgIconsPlugin } from './svgSprite';
|
||||
import { configQiankunMicroPlugin } from './qiankunMicro';
|
||||
// // electron plugin
|
||||
// import { configElectronPlugin } from "./electron";
|
||||
// //预编译加载插件(不支持vite3作废)
|
||||
// import OptimizationPersist from 'vite-plugin-optimize-persist';
|
||||
// import PkgConfig from 'vite-plugin-package-config';
|
||||
@ -68,6 +70,12 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunM
|
||||
vitePlugins.push(...configQiankunMicroPlugin(viteEnv))
|
||||
}
|
||||
|
||||
// // electron plugin
|
||||
// const isElectron = viteEnv.VITE_GLOB_RUN_PLATFORM === 'electron';
|
||||
// if (isElectron) {
|
||||
// vitePlugins.push(configElectronPlugin(viteEnv, isBuild))
|
||||
// }
|
||||
|
||||
// The following plugins only work in the production environment
|
||||
if (isBuild) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user