add Notify
This commit is contained in:
+4
-8
@@ -6,13 +6,13 @@ import Components from "unplugin-vue-components/vite";
|
||||
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
||||
|
||||
const localTimiWebRoot = fileURLToPath(new URL("../timi-web", import.meta.url));
|
||||
const localTimiWebModule = fileURLToPath(new URL("../timi-web/dist/timi-web.mjs", import.meta.url));
|
||||
const localTimiWebStyle = fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url));
|
||||
const projectRoot = fileURLToPath(new URL(".", import.meta.url));
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), "");
|
||||
const useLocalTimiWeb = env.VITE_USE_LOCAL_TIMI_WEB !== "false";
|
||||
const useLocalTimiWebSource = useLocalTimiWeb && mode === "development";
|
||||
const useLocalTimiWebPublish = useLocalTimiWeb && mode !== "development";
|
||||
return {
|
||||
resolve: {
|
||||
dedupe: ["vue", "pinia", "vue-router"],
|
||||
@@ -25,15 +25,11 @@ export default defineConfig(({ mode }) => {
|
||||
? [
|
||||
{
|
||||
find: /^timi-web$/,
|
||||
replacement: useLocalTimiWebSource
|
||||
? fileURLToPath(new URL("../timi-web/src/index.ts", import.meta.url))
|
||||
: fileURLToPath(new URL("../timi-web/dist/timi-web.mjs", import.meta.url))
|
||||
replacement: localTimiWebModule
|
||||
},
|
||||
{
|
||||
find: /^timi-web\/style\.css$/,
|
||||
replacement: useLocalTimiWebPublish
|
||||
? fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url))
|
||||
: fileURLToPath(new URL("../timi-web/src/assets/style/timi-web.less", import.meta.url))
|
||||
replacement: localTimiWebStyle
|
||||
}
|
||||
]
|
||||
: [])
|
||||
|
||||
Reference in New Issue
Block a user