| | |
| | | |
| | | import { defineConfig } from 'vite' |
| | | import vue from '@vitejs/plugin-vue' |
| | | import vueJsx from '@vitejs/plugin-vue-jsx'; |
| | | import electron from 'vite-plugin-electron' |
| | | |
| | | // https://vitejs.dev/config/ |
| | | export default defineConfig({ |
| | | base:"./", |
| | | plugins: [ |
| | | vue(), |
| | | vueJsx(), |
| | | vue({ |
| | | template: { |
| | | compilerOptions: { |
| | | isCustomElement: (tag) => tag.includes('math-field') |
| | | } |
| | | } |
| | | }), |
| | | // electron({ |
| | | // // 配置 Electron 入口文件 |
| | | // entry: 'electron-commonJS/main.js' |
| | | // }), |
| | | // }), |
| | | ], |
| | | resolve: { |
| | | alias: { |
| | |
| | | cors: true, // 允许跨域 |
| | | hmr: true, |
| | | headers: { |
| | | "Access-Control-Allow-Origin": "*", // 允许跨域访问子应用页面 |
| | | "access-control-allow-origin": "*", // 允许跨域访问子应用页面 |
| | | }, |
| | | }, |
| | | define: { |
| | |
| | | additionalData: '@import "./src/assets/style/global.less";' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }) |