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

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

No files matched your search

+1 -1
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)
})() })()
+2 -2
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',
]), ]),