diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..1689524c2fa --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + } + ] +} diff --git a/platform/viewer/.webpack/webpack.pwa.js b/platform/viewer/.webpack/webpack.pwa.js index 5b5d36a25fd..a36f6daa13f 100644 --- a/platform/viewer/.webpack/webpack.pwa.js +++ b/platform/viewer/.webpack/webpack.pwa.js @@ -41,6 +41,13 @@ module.exports = (env, argv) => { path: DIST_DIR, filename: isProdBuild ? '[name].bundle.[chunkhash].js' : '[name].js', publicPath: PUBLIC_URL, // Used by HtmlWebPackPlugin for asset prefix + devtoolModuleFilenameTemplate: function(info) { + if (isProdBuild) { + return `webpack:///${info.resourcePath}`; + } else { + return 'file:///' + encodeURI(info.absoluteResourcePath); + } + }, }, module: { rules: [...extractStyleChunksRule(isProdBuild)],