Skip to content

Commit 3906270

Browse files
feat: support vite4
1 parent c0f9dc6 commit 3906270

File tree

10 files changed

+375
-59
lines changed

10 files changed

+375
-59
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
registry=https://registry.npmmirror.com/
12
ignore-workspace-root-check=true
23
shamefully-hoist=true
34
git-checks=false

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## Changelog
22

3+
[0.3.3]
4+
- Feature: suppot vite@3
5+
6+
[0.3.2]
7+
- Fix: use more specific function types[#6](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/6)
8+
- Remove `fileName` mode (Because its performance is consistent with the performance of Vue itself, it is a repetitive thing.)
9+
310
[0.3.1]
411
- Fix legacy node `replaceAll`[#5](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/5)
512

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Make the vue script setup syntax support the name attribute
66

77
## CHANGELOG
88

9+
[0.3.3]
10+
- Feature: suppot vite@3
11+
912
[0.3.2]
1013
- Fix: use more specific function types[#6](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/6)
1114
- Remove `fileName` mode (Because its performance is consistent with the performance of Vue itself, it is a repetitive thing.)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"dependencies": {
6969
"@vue/compiler-sfc": "^3.2.37",
7070
"magic-string": "^0.26.2",
71-
"unplugin": "^0.6.3"
71+
"unplugin": "^1.0.0"
7272
},
7373
"devDependencies": {
7474
"@antfu/eslint-config": "^0.23.1",

playground/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<link rel="icon" href="/favicon.ico" />
67
<meta name="viewport" content="width=device-width, initial-scale=1.0">
78
</head>
9+
810
<body>
911
<div id="app"></div>
10-
<a href="/__inspect/module?id=./main.ts&index=2" target="_blank" style="text-decoration: none; margin-top:10px; display: block;">visit /__inspect/ to inspect the intermediate state</a>
12+
<a href="/__inspect/module?id=./main.ts&index=2" target="_blank"
13+
style="text-decoration: none; margin-top:10px; display: block;">visit /__inspect/ to inspect the intermediate
14+
state</a>
1115
<script type="module" src="./main.ts"></script>
1216
</body>
17+
1318
</html>

playground/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"private": true,
33
"scripts": {
4-
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x vite"
4+
"dev": "vite"
55
},
66
"devDependencies": {
77
"@vitejs/plugin-vue": "^2.3.3",
8+
"typescript": "^4.6.4",
89
"unplugin-vue-setup-extend-plus": "workspace:^0.3.1",
9-
"vite": "^2.9.9",
10+
"vite": "^4.0.0",
1011
"vite-plugin-inspect": "^0.5.0"
1112
},
1213
"dependencies": {

playground/tsconfig.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"moduleResolution": "Node",
7+
"strict": true,
8+
"jsx": "preserve",
9+
"sourceMap": true,
10+
"resolveJsonModule": true,
11+
"isolatedModules": true,
12+
"esModuleInterop": true,
13+
"lib": ["ESNext", "DOM"],
14+
"skipLibCheck": true
15+
},
16+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
17+
"references": [{ "path": "./tsconfig.node.json" }]
18+
}

playground/tsconfig.node.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"module": "ESNext",
5+
"moduleResolution": "Node",
6+
"allowSyntheticDefaultImports": true
7+
},
8+
"include": ["vite.config.ts"]
9+
}

playground/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { defineConfig } from 'vite'
2-
import Inspect from 'vite-plugin-inspect'
2+
// import Inspect from 'vite-plugin-inspect'
33
import vue from '@vitejs/plugin-vue'
44
import vueSetupExtend from 'unplugin-vue-setup-extend-plus/vite'
55
import Unplugin from '../src/vite'
66

77
export default defineConfig({
88
plugins: [
99
vue(),
10-
Inspect(),
10+
// Inspect(),
1111
Unplugin({}),
1212
vueSetupExtend({ /* options */ }),
1313
],

0 commit comments

Comments
 (0)