vite-plugin-esmodule instead scripts/vite-plugin-esm2cjs

This commit is contained in:
草鞋没号 2022-03-14 16:50:07 +08:00
parent d55caa06d5
commit 3c1424ac91
2 changed files with 3 additions and 3 deletions

View File

@ -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)
})() })()

View File

@ -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',
]), ]),