diff --git a/apps/remix-ide/project.json b/apps/remix-ide/project.json index a632f0f640..acaf8e284f 100644 --- a/apps/remix-ide/project.json +++ b/apps/remix-ide/project.json @@ -31,7 +31,7 @@ "configurations": { "development": { "extractLicenses": false, - "sourceMap": false, + "sourceMap": true, "vendorChunk": true, "optimization": false }, diff --git a/apps/remix-ide/webpack.config.js b/apps/remix-ide/webpack.config.js index c61e40128d..b3eeff148f 100644 --- a/apps/remix-ide/webpack.config.js +++ b/apps/remix-ide/webpack.config.js @@ -42,6 +42,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => { "buffer": require.resolve("buffer/"), "vm": require.resolve('vm-browserify'), } + // add externals config.externals = { @@ -71,6 +72,16 @@ module.exports = composePlugins(withNx(), withReact(), (config) => { }) ) + // souce-map loader + config.module.rules.push({ + test: /\.js$/, + use: ["source-map-loader"], + enforce: "pre" + }) + + config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings + + // set minimizer config.optimization.minimizer = [ new TerserPlugin({