mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-30 09:24:46 +08:00
perf: build
This commit is contained in:
parent
d192d842ed
commit
0b8e402375
@ -7,7 +7,6 @@ import vueJsx from "@vitejs/plugin-vue-jsx";
|
|||||||
import WindiCSS from "vite-plugin-windicss";
|
import WindiCSS from "vite-plugin-windicss";
|
||||||
import { viteMockServe } from "vite-plugin-mock";
|
import { viteMockServe } from "vite-plugin-mock";
|
||||||
import VueI18n from "@intlify/vite-plugin-vue-i18n";
|
import VueI18n from "@intlify/vite-plugin-vue-i18n";
|
||||||
// import ElementPlus from "unplugin-element-plus/vite";
|
|
||||||
import { visualizer } from "rollup-plugin-visualizer";
|
import { visualizer } from "rollup-plugin-visualizer";
|
||||||
import removeConsole from "vite-plugin-remove-console";
|
import removeConsole from "vite-plugin-remove-console";
|
||||||
import themePreprocessorPlugin from "@pureadmin/theme";
|
import themePreprocessorPlugin from "@pureadmin/theme";
|
||||||
@ -34,25 +33,18 @@ export function getPluginsList(command, VITE_LEGACY) {
|
|||||||
themePreprocessorPlugin({
|
themePreprocessorPlugin({
|
||||||
scss: {
|
scss: {
|
||||||
multipleScopeVars: genScssMultipleScopeVars(),
|
multipleScopeVars: genScssMultipleScopeVars(),
|
||||||
// 默认取 multipleScopeVars[0].scopeName
|
|
||||||
defaultScopeName: "",
|
|
||||||
// 在生产模式是否抽取独立的主题css文件,extract为true以下属性有效
|
// 在生产模式是否抽取独立的主题css文件,extract为true以下属性有效
|
||||||
extract: true,
|
extract: true,
|
||||||
// 独立主题css文件的输出路径,默认取 viteConfig.build.assetsDir 相对于 (viteConfig.build.outDir)
|
|
||||||
outputDir: "",
|
|
||||||
// 会选取defaultScopeName对应的主题css文件在html添加link
|
// 会选取defaultScopeName对应的主题css文件在html添加link
|
||||||
themeLinkTagId: "head",
|
themeLinkTagId: "head",
|
||||||
// "head"||"head-prepend" || "body" ||"body-prepend"
|
// "head"||"head-prepend" || "body" ||"body-prepend"
|
||||||
themeLinkTagInjectTo: "head",
|
themeLinkTagInjectTo: "head",
|
||||||
// 是否对抽取的css文件内对应scopeName的权重类名移除
|
// 是否对抽取的css文件内对应scopeName的权重类名移除
|
||||||
removeCssScopeName: false,
|
removeCssScopeName: false
|
||||||
// 可以自定义css文件名称的函数
|
|
||||||
customThemeCssFileName: scopeName => scopeName
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
// svg组件化支持
|
// svg组件化支持
|
||||||
svgLoader(),
|
svgLoader(),
|
||||||
// ElementPlus({}),
|
|
||||||
// mock支持
|
// mock支持
|
||||||
viteMockServe({
|
viteMockServe({
|
||||||
mockPath: "mock",
|
mockPath: "mock",
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
"@iconify-icons/ri": "^1.2.1",
|
"@iconify-icons/ri": "^1.2.1",
|
||||||
"@iconify-icons/uil": "^1.2.1",
|
"@iconify-icons/uil": "^1.2.1",
|
||||||
"@iconify/vue": "^3.2.1",
|
"@iconify/vue": "^3.2.1",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^3.3.1",
|
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
||||||
"@pureadmin/theme": "^1.1.0",
|
"@pureadmin/theme": "^1.1.0",
|
||||||
"@types/element-resize-detector": "1.1.3",
|
"@types/element-resize-detector": "1.1.3",
|
||||||
"@types/js-cookie": "^3.0.1",
|
"@types/js-cookie": "^3.0.1",
|
||||||
@ -127,7 +127,6 @@
|
|||||||
"stylelint-config-standard": "^24.0.0",
|
"stylelint-config-standard": "^24.0.0",
|
||||||
"stylelint-order": "^5.0.0",
|
"stylelint-order": "^5.0.0",
|
||||||
"typescript": "^4.6.3",
|
"typescript": "^4.6.3",
|
||||||
"unplugin-element-plus": "^0.4.0",
|
|
||||||
"vite": "^2.9.5",
|
"vite": "^2.9.5",
|
||||||
"vite-plugin-mock": "^2.9.6",
|
"vite-plugin-mock": "^2.9.6",
|
||||||
"vite-plugin-remove-console": "^0.0.7",
|
"vite-plugin-remove-console": "^0.0.7",
|
||||||
|
123
pnpm-lock.yaml
generated
123
pnpm-lock.yaml
generated
@ -14,7 +14,7 @@ specifiers:
|
|||||||
"@iconify-icons/ri": ^1.2.1
|
"@iconify-icons/ri": ^1.2.1
|
||||||
"@iconify-icons/uil": ^1.2.1
|
"@iconify-icons/uil": ^1.2.1
|
||||||
"@iconify/vue": ^3.2.1
|
"@iconify/vue": ^3.2.1
|
||||||
"@intlify/vite-plugin-vue-i18n": ^3.3.1
|
"@intlify/vite-plugin-vue-i18n": ^3.4.0
|
||||||
"@logicflow/core": ^1.1.14
|
"@logicflow/core": ^1.1.14
|
||||||
"@logicflow/extension": ^1.1.14
|
"@logicflow/extension": ^1.1.14
|
||||||
"@pureadmin/components": ^1.0.6
|
"@pureadmin/components": ^1.0.6
|
||||||
@ -88,7 +88,6 @@ specifiers:
|
|||||||
stylelint-config-standard: ^24.0.0
|
stylelint-config-standard: ^24.0.0
|
||||||
stylelint-order: ^5.0.0
|
stylelint-order: ^5.0.0
|
||||||
typescript: ^4.6.3
|
typescript: ^4.6.3
|
||||||
unplugin-element-plus: ^0.4.0
|
|
||||||
v-contextmenu: 3.0.0
|
v-contextmenu: 3.0.0
|
||||||
vite: ^2.9.5
|
vite: ^2.9.5
|
||||||
vite-plugin-mock: ^2.9.6
|
vite-plugin-mock: ^2.9.6
|
||||||
@ -166,7 +165,7 @@ devDependencies:
|
|||||||
"@iconify-icons/ri": 1.2.1
|
"@iconify-icons/ri": 1.2.1
|
||||||
"@iconify-icons/uil": 1.2.1
|
"@iconify-icons/uil": 1.2.1
|
||||||
"@iconify/vue": 3.2.1_vue@3.2.33
|
"@iconify/vue": 3.2.1_vue@3.2.33
|
||||||
"@intlify/vite-plugin-vue-i18n": 3.3.1_3d08e1d9025840888da5ae870455a383
|
"@intlify/vite-plugin-vue-i18n": 3.4.0_3d08e1d9025840888da5ae870455a383
|
||||||
"@pureadmin/theme": 1.1.0
|
"@pureadmin/theme": 1.1.0
|
||||||
"@types/element-resize-detector": 1.1.3
|
"@types/element-resize-detector": 1.1.3
|
||||||
"@types/js-cookie": 3.0.1
|
"@types/js-cookie": 3.0.1
|
||||||
@ -209,7 +208,6 @@ devDependencies:
|
|||||||
stylelint-config-standard: 24.0.0_stylelint@14.6.0
|
stylelint-config-standard: 24.0.0_stylelint@14.6.0
|
||||||
stylelint-order: 5.0.0_stylelint@14.6.0
|
stylelint-order: 5.0.0_stylelint@14.6.0
|
||||||
typescript: 4.6.3
|
typescript: 4.6.3
|
||||||
unplugin-element-plus: 0.4.0_rollup@2.70.1+vite@2.9.5
|
|
||||||
vite: 2.9.5_sass@1.50.1
|
vite: 2.9.5_sass@1.50.1
|
||||||
vite-plugin-mock: 2.9.6_9bee6d01fd796cb52b526d4503041d36
|
vite-plugin-mock: 2.9.6_9bee6d01fd796cb52b526d4503041d36
|
||||||
vite-plugin-remove-console: 0.0.7
|
vite-plugin-remove-console: 0.0.7
|
||||||
@ -1067,10 +1065,10 @@ packages:
|
|||||||
vue: 3.2.33
|
vue: 3.2.33
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@intlify/bundle-utils/3.0.0_vue-i18n@9.2.0-beta.35:
|
/@intlify/bundle-utils/2.2.2_vue-i18n@9.2.0-beta.35:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-y43Z5Q3ZJvxqtD8xUH6U3yrlZeay7ZTqkzv1GQ4b0mGQtk5uptOT9Ra4qvGuUv8QyPQsortrA/OHWUD5ax5ZNQ==
|
integrity: sha512-vngkvlIVV8ZJoyC5VqMvqJd2nvsx+qMN7pQjPiPjOrVndeiR7Dlue0k86Q8FsFUzyksW3HJZZi833ldxwbFzTA==
|
||||||
}
|
}
|
||||||
engines: { node: ">= 12" }
|
engines: { node: ">= 12" }
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1082,8 +1080,8 @@ packages:
|
|||||||
vue-i18n:
|
vue-i18n:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
"@intlify/message-compiler": 9.2.0-beta.35
|
"@intlify/message-compiler": 9.1.9
|
||||||
"@intlify/shared": 9.2.0-beta.35
|
"@intlify/shared": 9.1.9
|
||||||
jsonc-eslint-parser: 1.4.1
|
jsonc-eslint-parser: 1.4.1
|
||||||
source-map: 0.6.1
|
source-map: 0.6.1
|
||||||
vue-i18n: 9.2.0-beta.35_vue@3.2.33
|
vue-i18n: 9.2.0-beta.35_vue@3.2.33
|
||||||
@ -1113,6 +1111,18 @@ packages:
|
|||||||
"@intlify/shared": 9.2.0-beta.35
|
"@intlify/shared": 9.2.0-beta.35
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@intlify/message-compiler/9.1.9:
|
||||||
|
resolution:
|
||||||
|
{
|
||||||
|
integrity: sha512-6YgCMF46Xd0IH2hMRLCssZI3gFG4aywidoWQ3QP4RGYQXQYYfFC54DxhSgfIPpVoPLQ+4AD29eoYmhiHZ+qLFQ==
|
||||||
|
}
|
||||||
|
engines: { node: ">= 10" }
|
||||||
|
dependencies:
|
||||||
|
"@intlify/message-resolver": 9.1.9
|
||||||
|
"@intlify/shared": 9.1.9
|
||||||
|
source-map: 0.6.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@intlify/message-compiler/9.2.0-beta.35:
|
/@intlify/message-compiler/9.2.0-beta.35:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
@ -1122,6 +1132,23 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@intlify/shared": 9.2.0-beta.35
|
"@intlify/shared": 9.2.0-beta.35
|
||||||
source-map: 0.6.1
|
source-map: 0.6.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@intlify/message-resolver/9.1.9:
|
||||||
|
resolution:
|
||||||
|
{
|
||||||
|
integrity: sha512-Lx/DBpigeK0sz2BBbzv5mu9/dAlt98HxwbG7xLawC3O2xMF9MNWU5FtOziwYG6TDIjNq0O/3ZbOJAxwITIWXEA==
|
||||||
|
}
|
||||||
|
engines: { node: ">= 10" }
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@intlify/shared/9.1.9:
|
||||||
|
resolution:
|
||||||
|
{
|
||||||
|
integrity: sha512-xKGM1d0EAxdDFCWedcYXOm6V5Pfw/TMudd6/qCdEb4tv0hk9EKeg7lwQF1azE0dP2phvx0yXxrt7UQK+IZjNdw==
|
||||||
|
}
|
||||||
|
engines: { node: ">= 10" }
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@intlify/shared/9.2.0-beta.35:
|
/@intlify/shared/9.2.0-beta.35:
|
||||||
resolution:
|
resolution:
|
||||||
@ -1129,25 +1156,26 @@ packages:
|
|||||||
integrity: sha512-DXf7xrwf08GKhr93XPQ8EgaEN0CIELl+mAS6SlRhi/aLtZv5HSGSMkz4M/ICwoWzFLSgOx/ZdBSasex19MMogg==
|
integrity: sha512-DXf7xrwf08GKhr93XPQ8EgaEN0CIELl+mAS6SlRhi/aLtZv5HSGSMkz4M/ICwoWzFLSgOx/ZdBSasex19MMogg==
|
||||||
}
|
}
|
||||||
engines: { node: ">= 12" }
|
engines: { node: ">= 12" }
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@intlify/vite-plugin-vue-i18n/3.3.1_3d08e1d9025840888da5ae870455a383:
|
/@intlify/vite-plugin-vue-i18n/3.4.0_3d08e1d9025840888da5ae870455a383:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-b9HIUANzL4/LmrA5RqeiPabZl2/RiWNAJ90TVZ8kSi3APRZ4BbmwUAclKe8ip+1jCDhqaGO/qfAI7SbQ0Y76Uw==
|
integrity: sha512-XXcZBgwJ+3FRu11c4ARoY9N00kElPii0/jNZ49qR045Ka7/YGCwb1Ku14BBlMSEHiHDSjLQknLwrJKSQGVZLyA==
|
||||||
}
|
}
|
||||||
engines: { node: ">= 12" }
|
engines: { node: ">= 12" }
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
petite-vue-i18n: ^9.0.0
|
petite-vue-i18n: ^9.1.0
|
||||||
vite: ^2.0.0
|
vite: ^2.0.0
|
||||||
vue-i18n: ^9.0.0
|
vue-i18n: ^9.1.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
petite-vue-i18n:
|
petite-vue-i18n:
|
||||||
optional: true
|
optional: true
|
||||||
vue-i18n:
|
vue-i18n:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
"@intlify/bundle-utils": 3.0.0_vue-i18n@9.2.0-beta.35
|
"@intlify/bundle-utils": 2.2.2_vue-i18n@9.2.0-beta.35
|
||||||
"@intlify/shared": 9.2.0-beta.35
|
"@intlify/shared": 9.1.9
|
||||||
"@rollup/pluginutils": 4.2.0
|
"@rollup/pluginutils": 4.2.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
fast-glob: 3.2.11
|
fast-glob: 3.2.11
|
||||||
@ -3625,13 +3653,6 @@ packages:
|
|||||||
is-arrayish: 0.2.1
|
is-arrayish: 0.2.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/es-module-lexer/0.10.5:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==
|
|
||||||
}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/es5-ext/0.10.59:
|
/es5-ext/0.10.59:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
@ -7765,51 +7786,6 @@ packages:
|
|||||||
engines: { node: ">= 0.8" }
|
engines: { node: ">= 0.8" }
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/unplugin-element-plus/0.4.0_rollup@2.70.1+vite@2.9.5:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-iE4EZu8pp5Vz/qb9r45sCNSz9Px6KOthBpe6gFBV1E60g9A45HS+JhwAaj4Zki8HZ0YGW3LyrsBCrd+XhOypnQ==
|
|
||||||
}
|
|
||||||
engines: { node: ">=14.17.0" }
|
|
||||||
dependencies:
|
|
||||||
"@rollup/pluginutils": 4.2.0
|
|
||||||
es-module-lexer: 0.10.5
|
|
||||||
magic-string: 0.26.1
|
|
||||||
unplugin: 0.6.2_rollup@2.70.1+vite@2.9.5
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- esbuild
|
|
||||||
- rollup
|
|
||||||
- vite
|
|
||||||
- webpack
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/unplugin/0.6.2_rollup@2.70.1+vite@2.9.5:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-+QONc2uBFQbeo4x5mlJHjTKjR6pmuchMpGVrWhwdGFFMb4ttFZ4E9KqhOOrNcm3Q8NNyB1vJ4s5e36IZC7UWYw==
|
|
||||||
}
|
|
||||||
peerDependencies:
|
|
||||||
esbuild: ">=0.13"
|
|
||||||
rollup: ^2.50.0
|
|
||||||
vite: ^2.3.0
|
|
||||||
webpack: 4 || 5
|
|
||||||
peerDependenciesMeta:
|
|
||||||
esbuild:
|
|
||||||
optional: true
|
|
||||||
rollup:
|
|
||||||
optional: true
|
|
||||||
vite:
|
|
||||||
optional: true
|
|
||||||
webpack:
|
|
||||||
optional: true
|
|
||||||
dependencies:
|
|
||||||
chokidar: 3.5.3
|
|
||||||
rollup: 2.70.1
|
|
||||||
vite: 2.9.5_sass@1.50.1
|
|
||||||
webpack-sources: 3.2.3
|
|
||||||
webpack-virtual-modules: 0.4.3
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/uri-js/4.4.1:
|
/uri-js/4.4.1:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
@ -8143,21 +8119,6 @@ packages:
|
|||||||
loose-envify: 1.4.0
|
loose-envify: 1.4.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/webpack-sources/3.2.3:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
|
|
||||||
}
|
|
||||||
engines: { node: ">=10.13.0" }
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/webpack-virtual-modules/0.4.3:
|
|
||||||
resolution:
|
|
||||||
{
|
|
||||||
integrity: sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==
|
|
||||||
}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/which/1.3.1:
|
/which/1.3.1:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
|
|||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
brotliSize: false,
|
brotliSize: false,
|
||||||
// 消除打包大小超过500kb警告
|
// 消除打包大小超过500kb警告
|
||||||
chunkSizeWarningLimit: 2000
|
chunkSizeWarningLimit: 4000
|
||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
__INTLIFY_PROD_DEVTOOLS__: false,
|
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user