vite-plugin-uni-pages-config
v1.0.4
Published
uniapp pages.json split manager
Downloads
2
Readme
###2022-06-28 修复没有配置tabbar时,组装错误 ###增加配置目录.js文件变更,触发重新组装,进而触发hbuilder差量编译.达到热更新的目的
import path from "path"
import {
defineConfig
} from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import vitePluginReplaceUniappConfig from "./project-config/vite.uni-configs.js"
console.error("当前用户: ", process.env.USER)
let node_env = process.env.NODE_ENV;
let uniPlugin = uni();
// console.log(uniPlugin)
export default defineConfig({
plugins: [
uniPlugin,
vitePluginReplaceUniappConfig([{
node_env,
dir: __dirname+"/project-config/pages.json/",
replaceFile: __dirname+"/pages.json",
rootDir: process.env.UNI_INPUT_DIR,
user: process.env.USER
}])
]
});