Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit ebae65c

Browse files
committed
feat: support merge normal scripts
1 parent cf82576 commit ebae65c

File tree

8 files changed

+95
-81
lines changed

8 files changed

+95
-81
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ dist
7979

8080
# IDE
8181
.idea
82+
83+
temp.ts

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Bring `<script setup>` to Vue 2
99
- [x] POC
1010
- [ ] Components registration
1111
- [ ] Compile time macros
12-
- [ ] Merge with normal scripts
12+
- [x] Merge with normal scripts
1313

1414
## Sponsors
1515

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"funding": "https://github.com/sponsors/antfu",
1515
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
1616
"license": "MIT",
17-
"sideEffects": false,
1817
"bugs": {
1918
"url": "https://github.com/antfu/vue2-script-setup-transform/issues"
2019
},
@@ -54,11 +53,11 @@
5453
"typescript": "^4.3.5"
5554
},
5655
"dependencies": {
56+
"@babel/core": "^7.15.0",
57+
"@babel/generator": "^7.15.0",
5758
"@babel/parser": "^7.15.3",
5859
"@babel/traverse": "^7.15.0",
59-
"@babel/types": "^7.15.0",
6060
"@vue/shared": "^3.2.4",
61-
"estree-walker": "^3.0.0",
6261
"htmlparser2": "^6.1.0",
6362
"magic-string": "^0.25.7"
6463
}

playground/App.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@ function dec() {
2424
2525
const decText = '<b>Dec</b>'
2626
</script>
27+
28+
<script lang="ts">
29+
export default {
30+
name: 'App'
31+
}
32+
</script>

pnpm-lock.yaml

Lines changed: 11 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)