fix: set esbuild mainFields and conditions to prioritize cjs

This commit is contained in:
Derrick Hammer 2023-07-07 04:09:03 -04:00
parent 978292521c
commit b1d4070193
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,8 @@ export default async function (context: PresetContext): Promise<PresetAsset> {
format: "cjs", format: "cjs",
bundle: true, bundle: true,
platform: "node", platform: "node",
mainFields: ["main", "module"],
conditions: ["require"],
}, },
}, },
variable: DEFAULT_VARIABLE, variable: DEFAULT_VARIABLE,