Skip to content

Commit 2080850

Browse files
committed
fix: fix webpack type error
1 parent 02d001c commit 2080850

File tree

7 files changed

+1932
-3783
lines changed

7 files changed

+1932
-3783
lines changed

build/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const baseConfig = {
1616
noExternal: ['estree-walker'],
1717
format: ['cjs', 'esm'],
1818
clean: true,
19-
minify: false,
19+
minify: true,
2020
dts: false,
2121
outDir: path.resolve(process.cwd(), '../dist'),
2222

@@ -49,6 +49,7 @@ if (buildMode === 'dev') {
4949
config.outDir = entryKey === 'index'
5050
? path.resolve(process.cwd(), '../dist') : path.resolve(process.cwd(), `../dist/${entryKey}`)
5151
config.dts = true
52+
config.minify = false
5253
config.watch = ['../packages/**/**.ts']
5354
config.noExternal = [/@unplugin-vue-cssvars/]
5455
configOptions.push(config)

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"fs-extra": "^11.1.1",
7979
"hash-sum": "^2.0.0",
8080
"magic-string": "^0.30.0",
81-
"source-map-diff": "^1.3.1",
8281
"unplugin": "^1.3.1",
8382
"vue": "^3.2.47"
8483
},
@@ -89,7 +88,6 @@
8988
"fs-extra": "^11.1.1",
9089
"hash-sum": "^2.0.0",
9190
"magic-string": "^0.30.0",
92-
"source-map-diff": "^1.3.1",
9391
"unplugin": "^1.3.1",
9492
"vue": "^3.2.47"
9593
},
@@ -110,8 +108,6 @@
110108
"@unplugin-vue-cssvars/build": "workspace:*",
111109
"@unplugin-vue-cssvars/core": "workspace:*",
112110
"@unplugin-vue-cssvars/entry": "workspace:*",
113-
"@unplugin-vue-cssvars/play-vite": "workspace:*",
114-
"@unplugin-vue-cssvars/play-webpack": "workspace:*",
115111
"@unplugin-vue-cssvars/utils": "workspace:*",
116112
"@vitejs/plugin-vue": "^4.1.0",
117113
"@vitejs/plugin-vue-jsx": "^3.0.1",
@@ -139,7 +135,8 @@
139135
"tsup": "^6.2.3",
140136
"typescript": "5.0.4",
141137
"vite": "^4.3.0",
142-
"vitest": "^0.30.1"
138+
"vitest": "^0.30.1",
139+
"webpack": "^5.80.0"
143140
},
144141
"simple-git-hooks": {
145142
"pre-commit": "pnpm lint-staged",

play/webpack/babel.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

play/webpack/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
"dev": "vue-cli-service serve",
77
"build": "vue-cli-service build"
88
},
9-
"dependencies": {
10-
"core-js": "^3.8.3"
11-
},
9+
1210
"devDependencies": {
13-
"@vue/cli-plugin-babel": "~5.0.0",
1411
"@vue/cli-plugin-typescript": "~5.0.0",
1512
"@vue/cli-service": "~5.0.0"
1613
},

play/webpack/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
3+
"target": "es5",
44
"module": "esnext",
55
"strict": true,
66
"jsx": "preserve",
7+
"importHelpers": true,
78
"moduleResolution": "node",
89
"skipLibCheck": true,
910
"esModuleInterop": true,

0 commit comments

Comments
 (0)