This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree 4 files changed +8
-13
lines changed
4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,13 @@ And then use [`vue-tsc`](https://github.com/johnsoncodehk/volar) to do the type
120
120
121
121
``` ts
122
122
// vue.config.js
123
+ const ScriptSetup = require (' unplugin-vue2-script-setup/webpack' ).default
123
124
124
125
module .exports = {
125
126
parallel: false , // disable thread-loader, which is not compactible with this plugin
126
127
configureWebpack: {
127
128
plugins: [
128
- require ( ' unplugin-vue2-script-setup/webpack ' ) ({ /* options */ }),
129
+ ScriptSetup ({ /* options */ }),
129
130
],
130
131
},
131
132
}
@@ -142,11 +143,12 @@ npm i -D @vue/cli-plugin-typescript vue-tsc
142
143
```
143
144
144
145
``` ts
146
+ const ScriptSetup = require (' unplugin-vue2-script-setup/webpack' ).default
145
147
module .exports = {
146
148
parallel: false ,
147
149
configureWebpack: {
148
150
plugins: [
149
- require ( ' unplugin-vue2-script-setup/webpack ' ) ({ /* options */ }),
151
+ ScriptSetup ({ /* options */ }),
150
152
],
151
153
},
152
154
chainWebpack(config ) {
@@ -175,10 +177,11 @@ And then use [`vue-tsc`](https://github.com/johnsoncodehk/volar) to do the type
175
177
176
178
``` ts
177
179
// webpack.config.js
180
+ const ScriptSetup = require (' unplugin-vue2-script-setup/webpack' ).default
178
181
module .exports = {
179
182
/* ... */
180
183
plugins: [
181
- require ( ' unplugin-vue2-script-setup/webpack ' ) ({ /* options */ }),
184
+ ScriptSetup ({ /* options */ }),
182
185
]
183
186
}
184
187
```
@@ -209,10 +212,11 @@ export default {
209
212
``` ts
210
213
// esbuild.config.js
211
214
import { build } from ' esbuild'
215
+ import ScriptSetup from ' unplugin-vue2-script-setup/esbuild'
212
216
build ({
213
217
/* ... */
214
218
plugins: [
215
- require ( ' unplugin-vue2-script-setup/esbuild ' ) ({
219
+ ScriptSetup ({
216
220
/* options */
217
221
}),
218
222
],
Original file line number Diff line number Diff line change 1
1
import unplugin from '.'
2
2
3
3
export default unplugin . rollup
4
- module . exports = unplugin . rollup
5
- module . exports . default = unplugin . rollup
6
- Object . defineProperty ( module . exports , '__esModule' , { value : true } )
Original file line number Diff line number Diff line change 1
1
import unplugin from '.'
2
2
3
3
export default unplugin . vite
4
- module . exports = unplugin . vite
5
- module . exports . default = unplugin . vite
6
- Object . defineProperty ( module . exports , '__esModule' , { value : true } )
Original file line number Diff line number Diff line change 1
1
import unplugin from '.'
2
2
3
3
export default unplugin . webpack
4
- module . exports = unplugin . webpack
5
- module . exports . default = unplugin . webpack
6
- Object . defineProperty ( module . exports , '__esModule' , { value : true } )
You can’t perform that action at this time.
0 commit comments