chore: 容器框架升级,修复项目命令行异常问题

This commit is contained in:
wangxuefeng
2025-03-11 10:05:28 +08:00
parent de679d4289
commit 3e1a1b4a66
1187 changed files with 95352 additions and 12509 deletions

View File

@@ -0,0 +1,50 @@
import path from 'node:path';
import { defineConfig, loadEnv } from '@farmfe/core';
import less from '@farmfe/js-plugin-less';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
import Components from 'unplugin-vue-components/vite';
import mkcert from 'vite-plugin-mkcert';
import qiankun from 'vite-plugin-qiankun';
// @ts-ignore
export default defineConfig(({ mode }) => {
console.log('mode', mode);
const env = loadEnv(mode, process.cwd(), ['VITE_']);
return {
plugins: [less()],
vitePlugins: [
vue(),
vueJsx(),
mkcert(),
qiankun('y-code-app', {
useDevMode: env.VITE_NODE_ENV === 'development',
}) as any,
Components({
resolvers: [
AntDesignVueResolver({
importStyle: 'less',
}),
],
}),
],
server: {
cors: true,
port: Number(env.VITE_PORT),
},
compilation: {
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
// output: {
// path: path.resolve(process.cwd(), "../../dist/y-code-v1"),
// clean: true,
// },
},
};
});