From 12669471fb8b0a85e11cd69c96da5fae7c1fa332 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Sat, 16 May 2020 11:55:38 +0800 Subject: [PATCH] fix: bundle `resolve`, closes #11 --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 29875f8e..17c63a28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -72,7 +72,7 @@ export async function createRollupConfigs(files: string[], options: Options) { commonjsPlugin({ namedExports: { // commonjs plugin failed to detect named exports for `resolve`, TODO: report this bug - resolve: Object.keys(require('resolve')), + resolve: Object.keys(await import('resolve')), }, // @ts-ignore wrong typing in @rollup/plugin-commonjs ignore: (name: string) => {