From f6ba49c45f8516779a15f89b11207081c913c44d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 8 Jul 2023 02:10:33 -0400 Subject: [PATCH] fix: add default polyfill config --- src/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 4c7e2a8..28c37f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -87,7 +87,14 @@ export default async function (context: PresetContext): Promise { }, resolve: {}, optimize: {}, - polyfill: {}, + polyfill: { + exclude: ["fs"], + globals: { + Buffer: true, + global: true, + process: true, + }, + }, }, }, scripts: resolve(TEMPLATES, "scripts.yaml"),