Skip to content

Commit

Permalink
fix: support scanoss bundling
Browse files Browse the repository at this point in the history
scanoss depends on node-fetch <3. node-fetch in that version fails their
instance checks, as it relies on constructor/class names which are
removed by the backend bundling.

Adjusts the generated webpack configuration to keep the class name for
AbortSignal as this is the name checked in node-fetch.

fixes #14648
  • Loading branch information
sdirix committed Dec 18, 2024
1 parent b8149ba commit 20d77e7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,10 @@ const config = {
minimize: production,
minimizer: [
new TerserPlugin({
exclude: /^(lib|builtins)\\//
exclude: /^(lib|builtins)\\//${this.ifPackage(['@theia/scanoss', '@theia/ai-anthropic', '@theia/ai-openai'], () => `,
terserOptions: {
keep_classnames: /AbortSignal/
}`)}
})
]
},
Expand Down

0 comments on commit 20d77e7

Please sign in to comment.