Skip to content

Commit f1afe95

Browse files
committed
it was not any of the dependencies that was causing it to break, it was webpack.NormalModuleReplacementPlugin that needed to be there in order for the amazonq to compile
1 parent 4540f16 commit f1afe95

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/webpack.web.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ module.exports = (env, argv) => {
5353
new webpack.IgnorePlugin({
5454
resourceRegExp: /svgdom/, // matches the path in the require() statement
5555
}),
56+
// Handle node: protocol imports by normalizing them
57+
new webpack.NormalModuleReplacementPlugin(/^node:(.*)$/, (resource) => {
58+
resource.request = resource.request.replace(/^node:/, '')
59+
}),
5660
],
5761
resolve: {
5862
extensions: ['.ts', '.js'],

0 commit comments

Comments
 (0)