Skip to content

Commit

Permalink
feat: ✨ package
Browse files Browse the repository at this point in the history
- 升级vue3.3.9
  • Loading branch information
jsxiaosi committed Nov 26, 2023
1 parent 31de98f commit 2468295
Show file tree
Hide file tree
Showing 7 changed files with 996 additions and 332 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_ENV = "development"
VITE_ENV = development
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_ENV = "production"
VITE_ENV = production
2 changes: 1 addition & 1 deletion .env.staging
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_ENV = "staging"
VITE_ENV = staging
18 changes: 12 additions & 6 deletions build/vite/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import vue from '@vitejs/plugin-vue';

import vueJsx from '@vitejs/plugin-vue-jsx';

import type { Plugin, ConfigEnv } from 'vite';
import VueMacros from 'unplugin-vue-macros/vite';

import type { ConfigEnv, PluginOption } from 'vite';

// 检查插件状态
import Inspect from 'vite-plugin-inspect';
Expand Down Expand Up @@ -31,16 +33,20 @@ import viteBuildOuteInfo from './buildOuteInfo';
// eslint
// import { configEsLinterPlugin } from './eslinter'

export function createVitePlugins(isBuild = false, _configEnv: ConfigEnv) {
const vitePlugins: (Plugin | Plugin[])[] = [
export function createVitePlugins(_isBuild = false, _configEnv: ConfigEnv) {
const vitePlugins: PluginOption[] = [
// vue({
// reactivityTransform: true,
// }),
];

vitePlugins.push(
vue(),
vueJsx(), // if needed
VueMacros({
plugins: {
vue: vue(),
vueJsx: vueJsx(), // 如果需要
},
}),
);

vitePlugins.push(configStylePlugin());
Expand All @@ -49,7 +55,7 @@ export function createVitePlugins(isBuild = false, _configEnv: ConfigEnv) {

vitePlugins.push(configCompressPlugin('gzip', true));

vitePlugins.push(configMockPlugin(isBuild));
vitePlugins.push(configMockPlugin());

vitePlugins.push(configPwaPlugin());

Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
"@element-plus/icons-vue": "^2.1.0",
"@intlify/unplugin-vue-i18n": "^1.5.0",
"@jsxiaosi/utils": "^0.0.18",
"@logicflow/core": "^1.2.17",
"@logicflow/extension": "^1.2.18",
"@logicflow/core": "^1.2.18",
"@logicflow/extension": "^1.2.19",
"@vueuse/core": "^10.6.1",
"axios": "^1.6.2",
"commitlint": "18.4.2",
"commitlint": "18.4.3",
"dayjs": "^1.11.10",
"docx-preview": "^0.1.20",
"echarts": "^5.4.3",
Expand All @@ -65,8 +65,8 @@
"pinia": "^2.1.7",
"qs": "^6.11.2",
"sortablejs": "^1.15.0",
"vue": "^3.3.8",
"vue-i18n": "^9.7.0",
"vue": "^3.3.9",
"vue-i18n": "^9.7.1",
"vue-pdf-embed": "^1.2.1",
"vue-router": "^4.2.5",
"vue-types": "^5.1.1",
Expand All @@ -79,14 +79,14 @@
"@jsxiaosi/eslint-config-prettier": "^0.0.20",
"@jsxiaosi/eslint-config-vue": "^0.0.20",
"@types/core-js": "^2.5.8",
"@types/intro.js": "^5.1.4",
"@types/lodash-es": "^4.17.11",
"@types/intro.js": "^5.1.5",
"@types/lodash-es": "^4.17.12",
"@types/marked": "^5.0.2",
"@types/mockjs": "^1.0.10",
"@types/node": "*",
"@types/nprogress": "^0.2.3",
"@types/qs": "^6.9.10",
"@types/sortablejs": "^1.15.5",
"@types/sortablejs": "^1.15.7",
"@vitejs/plugin-vue": "^4.5.0",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/test-utils": "^2.4.2",
Expand All @@ -108,7 +108,7 @@
"postcss-scss": "^4.0.9",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"rollup-plugin-visualizer": "^5.9.2",
"rollup-plugin-visualizer": "^5.9.3",
"sass": "^1.69.5",
"stylelint": "^15.11.0",
"stylelint-config-property-sort-order-smacss": "^9.1.0",
Expand All @@ -120,15 +120,16 @@
"stylelint-order": "^6.0.3",
"stylelint-scss": "^5.3.1",
"tailwindcss": "^3.3.5",
"typescript": "^5.2.2",
"typescript": "^5.3.2",
"unplugin-element-plus": "^0.8.0",
"vite": "^5.0.0",
"unplugin-vue-macros": "^2.7.0",
"vite": "^5.0.2",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-fake-server": "^2.0.0",
"vite-plugin-imagemin": "^0.6.1",
"vite-plugin-inspect": "^0.7.42",
"vite-plugin-linter": "^2.0.7",
"vite-plugin-pwa": "^0.17.0",
"vite-plugin-pwa": "^0.17.2",
"vite-plugin-style-import": "^2.0.0",
"vite-plugin-svg-icons": "^2.0.1",
"vitest": "^0.34.6",
Expand Down
Loading

0 comments on commit 2468295

Please sign in to comment.