Skip to content

Commit

Permalink
refactor: set platform to browser instead of neutral
Browse files Browse the repository at this point in the history
/"neutral" leads to errors if an npm module does not have an "exports" field see Chevrotain/chevrotain#1941 . also typescript itself is not compatible with "neutral"
  • Loading branch information
samuelstroschein committed Jun 13, 2023
1 parent 8e5070d commit 3e63166
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source-code/core/src/plugin/pluginBuildConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export async function pluginBuildConfig(
// ------------ STATIC OPTIONS ------------

ops.bundle = true
ops.platform = "neutral"
//! "neutral" leads to errors if an npm module does not have an "exports" field
//! see https://github.com/Chevrotain/chevrotain/issues/1941
//! also typescript itself is not compatible with "neutral"
ops.platform = "browser"
ops.format = "esm"
// es2020 in anticipation of sandboxing JS with QuickJS in the near future
ops.target = "es2020"
Expand Down

0 comments on commit 3e63166

Please sign in to comment.