vite-plugin-esmodule instead scripts/vite-plugin-esm2cjs
This commit is contained in:
		
							parent
							
								
									d55caa06d5
								
							
						
					
					
						commit
						3c1424ac91
					
				| 
						 | 
					@ -2,5 +2,5 @@ import { execa } from 'execa'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(async () => {
 | 
					(async () => {
 | 
				
			||||||
  const { stdout } = await execa('echo', ['unicorns'])
 | 
					  const { stdout } = await execa('echo', ['unicorns'])
 | 
				
			||||||
  // console.log(stdout)
 | 
					  console.log(stdout)
 | 
				
			||||||
})()
 | 
					})()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,12 @@
 | 
				
			||||||
import { builtinModules } from 'module'
 | 
					import { builtinModules } from 'module'
 | 
				
			||||||
import { defineConfig } from 'vite'
 | 
					import { defineConfig } from 'vite'
 | 
				
			||||||
import esm2cjs from '../../scripts/vite-plugin-esm2cjs'
 | 
					import esmodule from 'vite-plugin-esmodule'
 | 
				
			||||||
import pkg from '../../package.json'
 | 
					import pkg from '../../package.json'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default defineConfig({
 | 
					export default defineConfig({
 | 
				
			||||||
  root: __dirname,
 | 
					  root: __dirname,
 | 
				
			||||||
  plugins: [
 | 
					  plugins: [
 | 
				
			||||||
    esm2cjs([
 | 
					    esmodule([
 | 
				
			||||||
      'execa',
 | 
					      'execa',
 | 
				
			||||||
      'node-fetch',
 | 
					      'node-fetch',
 | 
				
			||||||
    ]),
 | 
					    ]),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue