feat: add vite-plugin-vue-setup-extend
parent
def2b2a1dd
commit
4209625b1b
|
@ -78,8 +78,6 @@
|
||||||
"eslint-define-config": "^1.12.0",
|
"eslint-define-config": "^1.12.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-vue": "^9.7.0",
|
"eslint-plugin-vue": "^9.7.0",
|
||||||
"sass": "^1.56.1",
|
|
||||||
"sass-loader": "^13.2.0",
|
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.0.3",
|
||||||
"plop": "^3.1.1",
|
"plop": "^3.1.1",
|
||||||
"postcss": "^8.4.19",
|
"postcss": "^8.4.19",
|
||||||
|
@ -88,6 +86,7 @@
|
||||||
"prettier": "^2.8.0",
|
"prettier": "^2.8.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^3.4.0",
|
"rollup": "^3.4.0",
|
||||||
|
"sass": "^1.56.1",
|
||||||
"stylelint": "^14.15.0",
|
"stylelint": "^14.15.0",
|
||||||
"stylelint-config-html": "^1.1.0",
|
"stylelint-config-html": "^1.1.0",
|
||||||
"stylelint-config-prettier": "^9.0.4",
|
"stylelint-config-prettier": "^9.0.4",
|
||||||
|
@ -103,6 +102,7 @@
|
||||||
"vite-plugin-purge-icons": "^0.9.1",
|
"vite-plugin-purge-icons": "^0.9.1",
|
||||||
"vite-plugin-style-import": "2.0.0",
|
"vite-plugin-style-import": "2.0.0",
|
||||||
"vite-plugin-svg-icons": "^2.0.1",
|
"vite-plugin-svg-icons": "^2.0.1",
|
||||||
|
"vite-plugin-vue-setup-extend": "^0.4.0",
|
||||||
"vite-plugin-windicss": "^1.8.8",
|
"vite-plugin-windicss": "^1.8.8",
|
||||||
"vue-tsc": "^1.0.9",
|
"vue-tsc": "^1.0.9",
|
||||||
"windicss": "^3.5.6"
|
"windicss": "^3.5.6"
|
||||||
|
|
|
@ -52,7 +52,6 @@ specifiers:
|
||||||
rimraf: ^3.0.2
|
rimraf: ^3.0.2
|
||||||
rollup: ^3.4.0
|
rollup: ^3.4.0
|
||||||
sass: ^1.56.1
|
sass: ^1.56.1
|
||||||
sass-loader: ^13.2.0
|
|
||||||
stylelint: ^14.15.0
|
stylelint: ^14.15.0
|
||||||
stylelint-config-html: ^1.1.0
|
stylelint-config-html: ^1.1.0
|
||||||
stylelint-config-prettier: ^9.0.4
|
stylelint-config-prettier: ^9.0.4
|
||||||
|
@ -69,6 +68,7 @@ specifiers:
|
||||||
vite-plugin-purge-icons: ^0.9.1
|
vite-plugin-purge-icons: ^0.9.1
|
||||||
vite-plugin-style-import: 2.0.0
|
vite-plugin-style-import: 2.0.0
|
||||||
vite-plugin-svg-icons: ^2.0.1
|
vite-plugin-svg-icons: ^2.0.1
|
||||||
|
vite-plugin-vue-setup-extend: ^0.4.0
|
||||||
vite-plugin-windicss: ^1.8.8
|
vite-plugin-windicss: ^1.8.8
|
||||||
vue: 3.2.45
|
vue: 3.2.45
|
||||||
vue-cropper: ^1.0.3
|
vue-cropper: ^1.0.3
|
||||||
|
@ -144,7 +144,6 @@ devDependencies:
|
||||||
rimraf: registry.npmmirror.com/rimraf/3.0.2
|
rimraf: registry.npmmirror.com/rimraf/3.0.2
|
||||||
rollup: registry.npmmirror.com/rollup/3.4.0
|
rollup: registry.npmmirror.com/rollup/3.4.0
|
||||||
sass: registry.npmmirror.com/sass/1.56.1
|
sass: registry.npmmirror.com/sass/1.56.1
|
||||||
sass-loader: registry.npmmirror.com/sass-loader/13.2.0_sass@1.56.1
|
|
||||||
stylelint: registry.npmmirror.com/stylelint/14.15.0
|
stylelint: registry.npmmirror.com/stylelint/14.15.0
|
||||||
stylelint-config-html: registry.npmmirror.com/stylelint-config-html/1.1.0_qendsqix7hqecpnpx4fjs6qry4
|
stylelint-config-html: registry.npmmirror.com/stylelint-config-html/1.1.0_qendsqix7hqecpnpx4fjs6qry4
|
||||||
stylelint-config-prettier: registry.npmmirror.com/stylelint-config-prettier/9.0.4_stylelint@14.15.0
|
stylelint-config-prettier: registry.npmmirror.com/stylelint-config-prettier/9.0.4_stylelint@14.15.0
|
||||||
|
@ -160,6 +159,7 @@ devDependencies:
|
||||||
vite-plugin-purge-icons: registry.npmmirror.com/vite-plugin-purge-icons/0.9.1_vite@3.2.4
|
vite-plugin-purge-icons: registry.npmmirror.com/vite-plugin-purge-icons/0.9.1_vite@3.2.4
|
||||||
vite-plugin-style-import: registry.npmmirror.com/vite-plugin-style-import/2.0.0_vite@3.2.4
|
vite-plugin-style-import: registry.npmmirror.com/vite-plugin-style-import/2.0.0_vite@3.2.4
|
||||||
vite-plugin-svg-icons: registry.npmmirror.com/vite-plugin-svg-icons/2.0.1_vite@3.2.4
|
vite-plugin-svg-icons: registry.npmmirror.com/vite-plugin-svg-icons/2.0.1_vite@3.2.4
|
||||||
|
vite-plugin-vue-setup-extend: registry.npmmirror.com/vite-plugin-vue-setup-extend/0.4.0_vite@3.2.4
|
||||||
vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.8.8_vite@3.2.4
|
vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.8.8_vite@3.2.4
|
||||||
vue-tsc: registry.npmmirror.com/vue-tsc/1.0.9_typescript@4.9.3
|
vue-tsc: registry.npmmirror.com/vue-tsc/1.0.9_typescript@4.9.3
|
||||||
windicss: registry.npmmirror.com/windicss/3.5.6
|
windicss: registry.npmmirror.com/windicss/3.5.6
|
||||||
|
@ -5528,13 +5528,6 @@ packages:
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
registry.npmmirror.com/klona/2.0.5:
|
|
||||||
resolution: {integrity: sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/klona/-/klona-2.0.5.tgz}
|
|
||||||
name: klona
|
|
||||||
version: 2.0.5
|
|
||||||
engines: {node: '>= 8'}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/known-css-properties/0.26.0:
|
registry.npmmirror.com/known-css-properties/0.26.0:
|
||||||
resolution: {integrity: sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/known-css-properties/-/known-css-properties-0.26.0.tgz}
|
resolution: {integrity: sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/known-css-properties/-/known-css-properties-0.26.0.tgz}
|
||||||
name: known-css-properties
|
name: known-css-properties
|
||||||
|
@ -7325,33 +7318,6 @@ packages:
|
||||||
version: 2.1.2
|
version: 2.1.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
registry.npmmirror.com/sass-loader/13.2.0_sass@1.56.1:
|
|
||||||
resolution: {integrity: sha512-JWEp48djQA4nbZxmgC02/Wh0eroSUutulROUusYJO9P9zltRbNN80JCBHqRGzjd4cmZCa/r88xgfkjGD0TXsHg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass-loader/-/sass-loader-13.2.0.tgz}
|
|
||||||
id: registry.npmmirror.com/sass-loader/13.2.0
|
|
||||||
name: sass-loader
|
|
||||||
version: 13.2.0
|
|
||||||
engines: {node: '>= 14.15.0'}
|
|
||||||
peerDependencies:
|
|
||||||
fibers: '>= 3.1.0'
|
|
||||||
node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0
|
|
||||||
sass: ^1.3.0
|
|
||||||
sass-embedded: '*'
|
|
||||||
webpack: ^5.0.0
|
|
||||||
peerDependenciesMeta:
|
|
||||||
fibers:
|
|
||||||
optional: true
|
|
||||||
node-sass:
|
|
||||||
optional: true
|
|
||||||
sass:
|
|
||||||
optional: true
|
|
||||||
sass-embedded:
|
|
||||||
optional: true
|
|
||||||
dependencies:
|
|
||||||
klona: registry.npmmirror.com/klona/2.0.5
|
|
||||||
neo-async: registry.npmmirror.com/neo-async/2.6.2
|
|
||||||
sass: registry.npmmirror.com/sass/1.56.1
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
registry.npmmirror.com/sass/1.56.1:
|
registry.npmmirror.com/sass/1.56.1:
|
||||||
resolution: {integrity: sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/-/sass-1.56.1.tgz}
|
resolution: {integrity: sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sass/-/sass-1.56.1.tgz}
|
||||||
name: sass
|
name: sass
|
||||||
|
@ -8567,6 +8533,19 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
registry.npmmirror.com/vite-plugin-vue-setup-extend/0.4.0_vite@3.2.4:
|
||||||
|
resolution: {integrity: sha512-WMbjPCui75fboFoUTHhdbXzu4Y/bJMv5N9QT9a7do3wNMNHHqrk+Tn2jrSJU0LS5fGl/EG+FEDBYVUeWIkDqXQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-vue-setup-extend/-/vite-plugin-vue-setup-extend-0.4.0.tgz}
|
||||||
|
id: registry.npmmirror.com/vite-plugin-vue-setup-extend/0.4.0
|
||||||
|
name: vite-plugin-vue-setup-extend
|
||||||
|
version: 0.4.0
|
||||||
|
peerDependencies:
|
||||||
|
vite: '>=2.0.0'
|
||||||
|
dependencies:
|
||||||
|
'@vue/compiler-sfc': registry.npmmirror.com/@vue/compiler-sfc/3.2.45
|
||||||
|
magic-string: registry.npmmirror.com/magic-string/0.25.9
|
||||||
|
vite: registry.npmmirror.com/vite/3.2.4_ajklay5k626t46b6fyghkbup3i
|
||||||
|
dev: true
|
||||||
|
|
||||||
registry.npmmirror.com/vite-plugin-windicss/1.8.8_vite@3.2.4:
|
registry.npmmirror.com/vite-plugin-windicss/1.8.8_vite@3.2.4:
|
||||||
resolution: {integrity: sha512-iyu+ZX0NmhNEUaLPv7xtC+EFRBpWMmw0nhd9a9upayfuNG/thwslKiQKmRB7U/dG0k/2oWLvPDvN/B9i7oRgSA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-windicss/-/vite-plugin-windicss-1.8.8.tgz}
|
resolution: {integrity: sha512-iyu+ZX0NmhNEUaLPv7xtC+EFRBpWMmw0nhd9a9upayfuNG/thwslKiQKmRB7U/dG0k/2oWLvPDvN/B9i7oRgSA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-windicss/-/vite-plugin-windicss-1.8.8.tgz}
|
||||||
id: registry.npmmirror.com/vite-plugin-windicss/1.8.8
|
id: registry.npmmirror.com/vite-plugin-windicss/1.8.8
|
||||||
|
|
|
@ -75,19 +75,19 @@
|
||||||
</template>
|
</template>
|
||||||
</XModal>
|
</XModal>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts" name="Dept">
|
||||||
import { nextTick, onMounted, reactive, ref, unref } from 'vue'
|
import { nextTick, onMounted, reactive, ref, unref } from 'vue'
|
||||||
|
import { ElSelect, ElTreeSelect, ElOption } from 'element-plus'
|
||||||
|
import { VxeGridInstance } from 'vxe-table'
|
||||||
|
import { handleTree } from '@/utils/tree'
|
||||||
|
import { required } from '@/utils/formRules.js'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
import { useMessage } from '@/hooks/web/useMessage'
|
||||||
import { VxeGridInstance } from 'vxe-table'
|
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
||||||
import { ElSelect, ElTreeSelect, ElOption } from 'element-plus'
|
import { FormExpose } from '@/components/Form'
|
||||||
import { allSchemas } from './dept.data'
|
import { allSchemas } from './dept.data'
|
||||||
import * as DeptApi from '@/api/system/dept'
|
import * as DeptApi from '@/api/system/dept'
|
||||||
import { getListSimpleUsersApi, UserVO } from '@/api/system/user'
|
import { getListSimpleUsersApi, UserVO } from '@/api/system/user'
|
||||||
import { required } from '@/utils/formRules.js'
|
|
||||||
import { handleTree } from '@/utils/tree'
|
|
||||||
import { FormExpose } from '@/components/Form'
|
|
||||||
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
|
@ -2,16 +2,18 @@ import { resolve } from 'path'
|
||||||
import { loadEnv } from 'vite'
|
import { loadEnv } from 'vite'
|
||||||
import type { UserConfig, ConfigEnv } from 'vite'
|
import type { UserConfig, ConfigEnv } from 'vite'
|
||||||
import Vue from '@vitejs/plugin-vue'
|
import Vue from '@vitejs/plugin-vue'
|
||||||
import WindiCSS from 'vite-plugin-windicss'
|
|
||||||
import VueJsx from '@vitejs/plugin-vue-jsx'
|
import VueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import EslintPlugin from 'vite-plugin-eslint'
|
|
||||||
import VueI18n from '@intlify/vite-plugin-vue-i18n'
|
import VueI18n from '@intlify/vite-plugin-vue-i18n'
|
||||||
import { createStyleImportPlugin, ElementPlusResolve, VxeTableResolve } from 'vite-plugin-style-import'
|
import WindiCSS from 'vite-plugin-windicss'
|
||||||
import progress from 'vite-plugin-progress'
|
import progress from 'vite-plugin-progress'
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import EslintPlugin from 'vite-plugin-eslint'
|
||||||
import PurgeIcons from 'vite-plugin-purge-icons'
|
import PurgeIcons from 'vite-plugin-purge-icons'
|
||||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||||
import viteCompression from 'vite-plugin-compression'
|
import viteCompression from 'vite-plugin-compression'
|
||||||
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
||||||
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
|
import { createStyleImportPlugin, ElementPlusResolve, VxeTableResolve } from 'vite-plugin-style-import'
|
||||||
|
|
||||||
// 当前执行node命令时文件夹的地址(工作目录)
|
// 当前执行node命令时文件夹的地址(工作目录)
|
||||||
const root = process.cwd()
|
const root = process.cwd()
|
||||||
|
|
||||||
|
@ -56,6 +58,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
WindiCSS(),
|
WindiCSS(),
|
||||||
progress(),
|
progress(),
|
||||||
PurgeIcons(),
|
PurgeIcons(),
|
||||||
|
vueSetupExtend(),
|
||||||
createStyleImportPlugin({
|
createStyleImportPlugin({
|
||||||
resolves: [ElementPlusResolve(),VxeTableResolve()],
|
resolves: [ElementPlusResolve(),VxeTableResolve()],
|
||||||
libs: [{
|
libs: [{
|
||||||
|
|
Loading…
Reference in New Issue