Skip to content

Commit d84e922

Browse files
committed
feat
1 parent 7090811 commit d84e922

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

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

77
## CHANGELOG
8+
[0.2.1]
9+
- Fix webpack require error. [#1](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/1)
10+
811
[0.2.0]
912
- Automatically convert based on name and inheritAttrs
1013
## Feature
@@ -71,7 +74,8 @@ export default {
7174
module.exports = {
7275
/* ... */
7376
plugins: [
74-
require('unplugin-vue-setup-extend-plus/webpack')({ /* options */ })
77+
// require('unplugin-vue-setup-extend-plus/webpack')({ /* options */ })
78+
require('unplugin-vue-setup-extend-plus/webpack').default({ /* options */ })
7579
]
7680
}
7781
```
@@ -102,7 +106,8 @@ export default {
102106
module.exports = {
103107
configureWebpack: {
104108
plugins: [
105-
require('unplugin-vue-setup-extend-plus/webpack')({ /* options */ }),
109+
// require('unplugin-vue-setup-extend-plus/webpack').({ /* options */ }),
110+
require('unplugin-vue-setup-extend-plus/webpack').default({ /* options */ })
106111
],
107112
},
108113
}

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export default createUnplugin(() => ({
55
name: 'unplugin-vue-setup-extend-plus',
66
enforce: 'pre',
77

8+
transformInclude(id) {
9+
return id.endsWith('.vue')
10+
},
11+
812
async transform(code, id) {
913
if (!/\.vue$/.test(id))
1014
return null

0 commit comments

Comments
 (0)