Skip to content

Commit 9b7c44d

Browse files
committed
chore
1 parent d84e922 commit 9b7c44d

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ export default {
7474
module.exports = {
7575
/* ... */
7676
plugins: [
77-
// require('unplugin-vue-setup-extend-plus/webpack')({ /* options */ })
78-
require('unplugin-vue-setup-extend-plus/webpack').default({ /* options */ })
77+
require('unplugin-vue-setup-extend-plus/webpack')({ /* options */ })
7978
]
8079
}
8180
```
@@ -106,8 +105,7 @@ export default {
106105
module.exports = {
107106
configureWebpack: {
108107
plugins: [
109-
// require('unplugin-vue-setup-extend-plus/webpack').({ /* options */ }),
110-
require('unplugin-vue-setup-extend-plus/webpack').default({ /* options */ })
108+
require('unplugin-vue-setup-extend-plus/webpack')({ /* options */ }),
111109
],
112110
},
113111
}

src/core/unplugin.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { createUnplugin } from 'unplugin'
2+
import { supportScriptName } from './transform'
3+
4+
export default createUnplugin(() => ({
5+
name: 'unplugin-vue-setup-extend-plus',
6+
enforce: 'pre',
7+
8+
transformInclude(id) {
9+
return id.endsWith('.vue')
10+
},
11+
12+
async transform(code, id) {
13+
if (!/\.vue$/.test(id))
14+
return null
15+
16+
return supportScriptName.call(this, code, id)
17+
},
18+
}))

src/index.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,2 @@
1-
import { createUnplugin } from 'unplugin'
2-
import { supportScriptName } from './core/transform'
3-
4-
export default createUnplugin(() => ({
5-
name: 'unplugin-vue-setup-extend-plus',
6-
enforce: 'pre',
7-
8-
transformInclude(id) {
9-
return id.endsWith('.vue')
10-
},
11-
12-
async transform(code, id) {
13-
if (!/\.vue$/.test(id))
14-
return null
15-
16-
return supportScriptName.call(this, code, id)
17-
},
18-
}))
1+
export * from './types'
2+
export { default } from './core/unplugin'

0 commit comments

Comments
 (0)