|
@@ -1,74 +1,74 @@
|
|
|
-import { defineConfig } from 'vite'
|
|
|
-import vue from '@vitejs/plugin-vue'
|
|
|
-import path from 'path'
|
|
|
-import AutoImport from 'unplugin-auto-import/vite'
|
|
|
-import Components from 'unplugin-vue-components/vite'
|
|
|
-import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
|
-import postcsspxtoviewport from 'postcss-px-to-viewport'
|
|
|
+import { defineConfig } from "vite";
|
|
|
+import vue from "@vitejs/plugin-vue";
|
|
|
+import path from "path";
|
|
|
+import AutoImport from "unplugin-auto-import/vite";
|
|
|
+import Components from "unplugin-vue-components/vite";
|
|
|
+import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
|
+import postcsspxtoviewport from "postcss-px-to-viewport";
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
server: {
|
|
|
open: true,
|
|
|
- prot: 8088
|
|
|
+ prot: 8088,
|
|
|
},
|
|
|
resolve: {
|
|
|
|
|
|
alias: {
|
|
|
|
|
|
- '~': path.resolve(__dirname, './'),
|
|
|
+ "~": path.resolve(__dirname, "./"),
|
|
|
|
|
|
- '@': path.resolve(__dirname, './src')
|
|
|
+ "@": path.resolve(__dirname, "./src"),
|
|
|
},
|
|
|
|
|
|
- extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
|
|
|
+ extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
|
|
|
},
|
|
|
|
|
|
optimizeDeps: {
|
|
|
|
|
|
include: [
|
|
|
- '@jiaminghi/c-render',
|
|
|
- '@jiaminghi/c-render/lib/plugin/util',
|
|
|
- '@jiaminghi/charts/lib/util/index',
|
|
|
- '@jiaminghi/charts/lib/util',
|
|
|
- '@jiaminghi/charts/lib/extend/index',
|
|
|
- '@jiaminghi/charts',
|
|
|
- '@jiaminghi/color',
|
|
|
- 'highcharts',
|
|
|
- 'highcharts/highcharts-3d'
|
|
|
- ]
|
|
|
+ "@jiaminghi/c-render",
|
|
|
+ "@jiaminghi/c-render/lib/plugin/util",
|
|
|
+ "@jiaminghi/charts/lib/util/index",
|
|
|
+ "@jiaminghi/charts/lib/util",
|
|
|
+ "@jiaminghi/charts/lib/extend/index",
|
|
|
+ "@jiaminghi/charts",
|
|
|
+ "@jiaminghi/color",
|
|
|
+ "highcharts",
|
|
|
+ "highcharts/highcharts-3d",
|
|
|
+ ],
|
|
|
},
|
|
|
plugins: [
|
|
|
vue(),
|
|
|
-
|
|
|
+
|
|
|
AutoImport({
|
|
|
- resolvers: [ElementPlusResolver()]
|
|
|
+ resolvers: [ElementPlusResolver()],
|
|
|
}),
|
|
|
Components({
|
|
|
- resolvers: [ElementPlusResolver()]
|
|
|
- })
|
|
|
+ resolvers: [ElementPlusResolver()],
|
|
|
+ }),
|
|
|
],
|
|
|
css: {
|
|
|
postcss: {
|
|
|
plugins: [
|
|
|
postcsspxtoviewport({
|
|
|
- unitToConvert: 'px',
|
|
|
+ unitToConvert: "px",
|
|
|
|
|
|
viewportWidth: 3840,
|
|
|
unitPrecision: 4,
|
|
|
- propList: ['*'],
|
|
|
+ propList: ["*"],
|
|
|
|
|
|
|
|
|
- viewportUnit: 'vw',
|
|
|
- fontViewportUnit: 'vw',
|
|
|
+ viewportUnit: "vw",
|
|
|
+ fontViewportUnit: "vw",
|
|
|
selectorBlackList: [],
|
|
|
minPixelValue: 1,
|
|
|
mediaQuery: true,
|
|
|
replace: true,
|
|
|
exclude: [/node_modules\/(?!element-plus)/],
|
|
|
- landscape: false
|
|
|
- })
|
|
|
- ]
|
|
|
- }
|
|
|
+ landscape: false,
|
|
|
+ }),
|
|
|
+ ],
|
|
|
+ },
|
|
|
},
|
|
|
-})
|
|
|
+});
|