This repository was archived by the owner on Dec 25, 2024. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Expand file tree Collapse file tree 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
120120
121121``` ts 
122122//  vue.config.js
123+ const   ScriptSetup =  require (' unplugin-vue2-script-setup/webpack'  ).default 
123124
124125module .exports  =  {
125126  parallel: false ,  //  disable thread-loader, which is not compactible with this plugin
126127  configureWebpack: {
127128    plugins: [
128-       require ( ' unplugin-vue2-script-setup/webpack ' ) ({ /*  options */   }),
129+       ScriptSetup ({ /*  options */   }),
129130    ],
130131  },
131132}
@@ -142,11 +143,12 @@ npm i -D @vue/cli-plugin-typescript vue-tsc
142143``` 
143144
144145``` ts 
146+ const   ScriptSetup =  require (' unplugin-vue2-script-setup/webpack'  ).default 
145147module .exports  =  {
146148  parallel: false ,
147149  configureWebpack: {
148150    plugins: [
149-       require ( ' unplugin-vue2-script-setup/webpack ' ) ({ /*  options */   }),
151+       ScriptSetup ({ /*  options */   }),
150152    ],
151153  },
152154  chainWebpack(config ) {
@@ -175,10 +177,11 @@ And then use [`vue-tsc`](https://github.com/johnsoncodehk/volar) to do the type
175177
176178``` ts 
177179//  webpack.config.js
180+ const   ScriptSetup =  require (' unplugin-vue2-script-setup/webpack'  ).default 
178181module .exports  =  {
179182  /*  ... */ 
180183  plugins: [
181-     require ( ' unplugin-vue2-script-setup/webpack ' ) ({ /*  options */   }),
184+     ScriptSetup ({ /*  options */   }),
182185  ]
183186}
184187``` 
@@ -209,10 +212,11 @@ export default {
209212``` ts 
210213//  esbuild.config.js
211214import  { build  } from  ' esbuild' 
215+ import  ScriptSetup  from  ' unplugin-vue2-script-setup/esbuild' 
212216build ({
213217  /*  ... */ 
214218  plugins: [
215-     require ( ' unplugin-vue2-script-setup/esbuild ' ) ({
219+     ScriptSetup ({
216220      /*  options */ 
217221    }),
218222  ],
Original file line number Diff line number Diff line change 11import  unplugin  from  '.' 
22
33export  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 11import  unplugin  from  '.' 
22
33export  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 11import  unplugin  from  '.' 
22
33export  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