This commit is contained in:
houjunxiang
2025-10-09 18:19:55 +08:00
parent f2ffc65094
commit 386f1e7466
1553 changed files with 284685 additions and 32820 deletions

View File

@@ -2,15 +2,14 @@ import { loadEnv } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import path from 'path';
// import viteCompression from 'vite-plugin-compression';
import uniReadPagesV3Plugin from './sheep/router/utils/uni-read-pages-v3';
import mpliveMainfestPlugin from './sheep/libs/mplive-manifest-plugin';
import uniReadPagesV3Plugin from './nx/router/utils/uni-read-pages-v3';
// https://vitejs.dev/config/
export default (command, mode) => {
const env = loadEnv(mode, __dirname, 'SHOPRO_');
const env = loadEnv(mode, __dirname, 'NX_');
return {
envPrefix: "SHOPRO_",
envPrefix: "NX_",
plugins: [
uni(),
// viteCompression({
@@ -20,12 +19,11 @@ export default (command, mode) => {
pagesJsonDir: path.resolve(__dirname, './pages.json'),
includes: ['path', 'aliasPath', 'name', 'meta'],
}),
mpliveMainfestPlugin(env.SHOPRO_MPLIVE_ON)
],
server: {
host: true,
// open: true,
port: env.SHOPRO_DEV_PORT,
port: env.NX_DEV_PORT,
hmr: {
overlay: true,
},