dlzn-ui 1.32.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/vite-config.d.ts +1 -4
- package/node/vite-config.mjs +8 -12
- package/package.json +1 -1
package/node/vite-config.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { ConfigEnv, UserConfig } from 'vite';
|
|
2
|
-
interface Options {
|
|
3
|
-
root: string;
|
|
4
|
-
}
|
|
5
2
|
export declare function commonConfig(_env: ConfigEnv): UserConfig;
|
|
6
|
-
declare const _default: (_env: ConfigEnv
|
|
3
|
+
declare const _default: (_env: ConfigEnv) => UserConfig;
|
|
7
4
|
export default _default;
|
package/node/vite-config.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { needPort } from "./utils/index.mjs";
|
|
2
|
-
import { posix
|
|
2
|
+
import { posix } from "node:path";
|
|
3
3
|
import tailwindcss from "@tailwindcss/vite";
|
|
4
4
|
import vue from "@vitejs/plugin-vue";
|
|
5
5
|
import browserslist from "browserslist";
|
|
@@ -22,12 +22,9 @@ function bypass(req, res, options) {
|
|
|
22
22
|
res.setHeader("X-Res-ProxyUrl", proxyUrl);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
var vite_config_default = (_env
|
|
25
|
+
var vite_config_default = (_env) => {
|
|
26
26
|
const { command, mode } = _env;
|
|
27
|
-
const {
|
|
28
|
-
const resolvePath = (p) => resolve(root, p);
|
|
29
|
-
const envDir = resolvePath("build/env");
|
|
30
|
-
const { VITE_API_PROXY_PORT_ARRAY, VITE_APP_ID, VITE_APP_NAME = "", VITE_BASE_URL = "/", VITE_FORCE_PWD_CHANGE = true, VITE_PROXY_TARGET: viteProxyTarget, VITE_USE_LOGIN_CAPTCHA = true } = parseLoadedEnv(loadEnv(mode, envDir));
|
|
27
|
+
const { VITE_API_PROXY_PORT_ARRAY, VITE_APP_ID, VITE_APP_NAME = "", VITE_BASE_URL = "/", VITE_FORCE_PWD_CHANGE = true, VITE_PROXY_TARGET: viteProxyTarget, VITE_USE_LOGIN_CAPTCHA = true } = parseLoadedEnv(loadEnv(mode, "build/env"));
|
|
31
28
|
const VITE_PROXY_TARGET = Array.isArray(viteProxyTarget) ? viteProxyTarget : [viteProxyTarget];
|
|
32
29
|
console.log({
|
|
33
30
|
command,
|
|
@@ -107,24 +104,24 @@ var vite_config_default = (_env, options) => {
|
|
|
107
104
|
mode: isProduction ? "prod" : "dev",
|
|
108
105
|
title: VITE_APP_NAME
|
|
109
106
|
},
|
|
110
|
-
ejsOptions: { views: [
|
|
107
|
+
ejsOptions: { views: ["node_modules/dlzn-ui/build/ejs"] }
|
|
111
108
|
},
|
|
112
109
|
minify: true,
|
|
113
110
|
template: "node_modules/dlzn-ui/build/index.html"
|
|
114
|
-
}), tailwindAutoReference(
|
|
111
|
+
}), tailwindAutoReference("node_modules/dlzn-ui/assets/css/tailwindcss-entry.css")],
|
|
115
112
|
resolve: {
|
|
116
113
|
alias: [
|
|
117
114
|
{
|
|
118
115
|
find: "@",
|
|
119
|
-
replacement:
|
|
116
|
+
replacement: "src"
|
|
120
117
|
},
|
|
121
118
|
{
|
|
122
119
|
find: "img",
|
|
123
|
-
replacement:
|
|
120
|
+
replacement: "src/assets/images"
|
|
124
121
|
},
|
|
125
122
|
...isProduction ? [] : [{
|
|
126
123
|
find: /^.*tdesign-vue-next[/\\]es[/\\].*\.css$/,
|
|
127
|
-
replacement:
|
|
124
|
+
replacement: "src/plugins/tdesign-vue-next-for-dev/empty.css"
|
|
128
125
|
}]
|
|
129
126
|
],
|
|
130
127
|
extensions: [
|
|
@@ -133,7 +130,6 @@ var vite_config_default = (_env, options) => {
|
|
|
133
130
|
".js"
|
|
134
131
|
]
|
|
135
132
|
},
|
|
136
|
-
root,
|
|
137
133
|
server: {
|
|
138
134
|
host: "0.0.0.0",
|
|
139
135
|
open: false,
|