mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
refactor(build): switch to @vitejs/plugin-vue (#5504)
This commit is contained in:
parent
652a459d4f
commit
7bd0936349
@ -2,7 +2,7 @@ import path from 'path'
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
||||
import { rollup } from 'rollup'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import vue from 'rollup-plugin-vue'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import esbuild from 'rollup-plugin-esbuild'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
import filesize from 'rollup-plugin-filesize'
|
||||
@ -29,13 +29,12 @@ async function buildFullEntry(minify: boolean) {
|
||||
input: path.resolve(epRoot, 'index.ts'),
|
||||
plugins: [
|
||||
ElementPlusAlias(),
|
||||
vue({
|
||||
isProduction: true,
|
||||
}),
|
||||
nodeResolve({
|
||||
extensions: ['.mjs', '.js', '.json', '.ts'],
|
||||
}),
|
||||
vue({
|
||||
target: 'browser',
|
||||
exposeFilename: false,
|
||||
}),
|
||||
commonjs(),
|
||||
esbuild({
|
||||
minify,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { rollup } from 'rollup'
|
||||
import vue from 'rollup-plugin-vue'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import css from 'rollup-plugin-css-only'
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
@ -27,7 +27,9 @@ export const buildModules = async () => {
|
||||
plugins: [
|
||||
ElementPlusAlias(),
|
||||
css(),
|
||||
vue({ target: 'browser' }),
|
||||
vue({
|
||||
isProduction: false,
|
||||
}),
|
||||
nodeResolve({
|
||||
extensions: ['.mjs', '.js', '.json', '.ts'],
|
||||
}),
|
||||
@ -39,7 +41,6 @@ export const buildModules = async () => {
|
||||
filesize({ reporter }),
|
||||
],
|
||||
external: await generateExternal({ full: false }),
|
||||
treeshake: false,
|
||||
})
|
||||
await writeBundles(
|
||||
bundle,
|
||||
|
@ -87,6 +87,7 @@
|
||||
"@types/sass": "1.43.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.10.0",
|
||||
"@typescript-eslint/parser": "5.10.0",
|
||||
"@vitejs/plugin-vue": "2.1.0",
|
||||
"@vue/test-utils": "2.0.0-rc.16",
|
||||
"chalk": "4.1.2",
|
||||
"components-helper": "1.0.5",
|
||||
@ -115,7 +116,6 @@
|
||||
"rollup-plugin-css-only": "3.1.0",
|
||||
"rollup-plugin-esbuild": "4.8.2",
|
||||
"rollup-plugin-filesize": "9.1.2",
|
||||
"rollup-plugin-vue": "6.0.0",
|
||||
"sass": "1.49.0",
|
||||
"sucrase": "3.20.3",
|
||||
"ts-jest": "26.5.6",
|
||||
|
@ -34,8 +34,8 @@
|
||||
"dist/*",
|
||||
"theme-chalk/*.css",
|
||||
"theme-chalk/src/*.scss",
|
||||
"lib/components/**/*",
|
||||
"es/components/**/*"
|
||||
"es/components/*/style/*",
|
||||
"lib/components/*/style/*"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -31,6 +31,7 @@ importers:
|
||||
'@types/sass': 1.43.1
|
||||
'@typescript-eslint/eslint-plugin': 5.10.0
|
||||
'@typescript-eslint/parser': 5.10.0
|
||||
'@vitejs/plugin-vue': 2.1.0
|
||||
'@vue/test-utils': 2.0.0-rc.16
|
||||
'@vueuse/core': ^7.5.4
|
||||
async-validator: ^4.0.7
|
||||
@ -65,7 +66,6 @@ importers:
|
||||
rollup-plugin-css-only: 3.1.0
|
||||
rollup-plugin-esbuild: 4.8.2
|
||||
rollup-plugin-filesize: 9.1.2
|
||||
rollup-plugin-vue: 6.0.0
|
||||
sass: 1.49.0
|
||||
sucrase: 3.20.3
|
||||
ts-jest: 26.5.6
|
||||
@ -110,6 +110,7 @@ importers:
|
||||
'@types/sass': 1.43.1
|
||||
'@typescript-eslint/eslint-plugin': 5.10.0_706fb07ce74b1db611f19a02ad2ce784
|
||||
'@typescript-eslint/parser': 5.10.0_eslint@8.7.0+typescript@4.5.5
|
||||
'@vitejs/plugin-vue': 2.1.0_vue@3.2.27
|
||||
'@vue/test-utils': 2.0.0-rc.16_vue@3.2.27
|
||||
chalk: 4.1.2
|
||||
components-helper: 1.0.5
|
||||
@ -138,7 +139,6 @@ importers:
|
||||
rollup-plugin-css-only: 3.1.0_rollup@2.65.0
|
||||
rollup-plugin-esbuild: 4.8.2_esbuild@0.14.11+rollup@2.65.0
|
||||
rollup-plugin-filesize: 9.1.2
|
||||
rollup-plugin-vue: 6.0.0
|
||||
sass: 1.49.0
|
||||
sucrase: 3.20.3
|
||||
ts-jest: 26.5.6_jest@26.6.3+typescript@4.5.5
|
||||
@ -2150,6 +2150,16 @@ packages:
|
||||
vue: 3.2.27
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue/2.1.0_vue@3.2.27:
|
||||
resolution: {integrity: sha512-AZ78WxvFMYd8JmM/GBV6a6SGGTU0GgN/0/4T+FnMMsLzFEzTeAUwuraapy50ifHZsC+G5SvWs86bvaCPTneFlA==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
vite: ^2.5.10
|
||||
vue: ^3.2.25
|
||||
dependencies:
|
||||
vue: 3.2.27
|
||||
dev: true
|
||||
|
||||
/@volar/code-gen/0.30.6:
|
||||
resolution: {integrity: sha512-odkXN91QCS/KRKPk4eUQp7jkN0PuYLwDuJZwGiDDJrZWUCCSdEvSj7e+Cjk7Q7doX0G9WAF88BL7ozcjzrtiKw==}
|
||||
dependencies:
|
||||
@ -3965,18 +3975,6 @@ packages:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
|
||||
/debug/4.3.2:
|
||||
resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==}
|
||||
engines: {node: '>=6.0'}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.2
|
||||
dev: true
|
||||
|
||||
/debug/4.3.3:
|
||||
resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==}
|
||||
engines: {node: '>=6.0'}
|
||||
@ -4976,10 +4974,6 @@ packages:
|
||||
engines: {node: '>=4.0'}
|
||||
dev: true
|
||||
|
||||
/estree-walker/0.6.1:
|
||||
resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==}
|
||||
dev: true
|
||||
|
||||
/estree-walker/1.0.1:
|
||||
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
|
||||
dev: true
|
||||
@ -5967,10 +5961,6 @@ packages:
|
||||
function-bind: 1.1.1
|
||||
dev: true
|
||||
|
||||
/hash-sum/2.0.0:
|
||||
resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==}
|
||||
dev: true
|
||||
|
||||
/homedir-polyfill/1.0.3:
|
||||
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -9365,24 +9355,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/rollup-plugin-vue/6.0.0:
|
||||
resolution: {integrity: sha512-oVvUd84d5u73M2HYM3XsMDLtZRIA/tw2U0dmHlXU2UWP5JARYHzh/U9vcxaN/x/9MrepY7VH3pHFeOhrWpxs/Q==}
|
||||
peerDependencies:
|
||||
'@vue/compiler-sfc': '*'
|
||||
dependencies:
|
||||
debug: 4.3.2
|
||||
hash-sum: 2.0.0
|
||||
rollup-pluginutils: 2.8.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/rollup-pluginutils/2.8.2:
|
||||
resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==}
|
||||
dependencies:
|
||||
estree-walker: 0.6.1
|
||||
dev: true
|
||||
|
||||
/rollup/2.64.0:
|
||||
resolution: {integrity: sha512-+c+lbw1lexBKSMb1yxGDVfJ+vchJH3qLbmavR+awDinTDA2C5Ug9u7lkOzj62SCu0PKUExsW36tpgW7Fmpn3yQ==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
Loading…
Reference in New Issue
Block a user