Skip to content

Commit

Permalink
chore: turn sourcemaps back on
Browse files Browse the repository at this point in the history
Ok, parent commit ran without errors:

- https://github.com/wincent/masochist/actions/runs/10384681229/job/28752223953

```
Starting upload with concurrency 20.
Will look for sourcemaps in dist
Will match JS files for errors on files starting with /static/
version: 9764ba1 service: masochist project path: /./

Command summary:
⚠️ No sourcemaps detected. Did you specify the correct directory?
```

So, we're ready for phase 2. Let's turn sourcemaps back on, having
previously turned them off in 1bc1cd5
("chore: don't emit sourcemaps in prod", 2024-03-28).

Using recommended config from:

- https://docs.datadoghq.com/real_user_monitoring/guide/upload-javascript-source-maps/?tab=webpackjs
  • Loading branch information
wincent committed Aug 14, 2024
1 parent 9764ba1 commit 8350ea5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webpack.production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = BUILDS.map(({name, filename, targets, terserOptions}) => {
],
},
mode: 'production',
devtool: false,
node: false,
plugins: [
new AssetsPlugin({
Expand All @@ -71,6 +72,10 @@ module.exports = BUILDS.map(({name, filename, targets, terserOptions}) => {
')\\b',
),
}),
new webpack.SourceMapDevToolPlugin({
noSources: false,
filename: '[file].map',
}),
function () {
this.hooks.done.tapAsync(
'copy-assets-from-dist-to-public-static',
Expand Down

1 comment on commit 8350ea5

@wincent
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed to work:

Starting upload with concurrency 20. 
Will look for sourcemaps in dist
Will match JS files for errors on files starting with /static/
version: 8350ea50e547df9f8ce7942992a403d5a1be9a8f service: masochist project path: /./
Uploading sourcemap dist/bundle-1a9f70e55d7990defe39.mjs.map for JS file available at /static/bundle-1a9f70e55d7990defe39.mjs
Uploading sourcemap dist/bundle-ef2d9cd3dc04fff0869d.js.map for JS file available at /static/bundle-ef2d9cd3dc04fff0869d.js
Command summary:
✅ Uploaded 2 sourcemaps in 0.408 seconds.

Please sign in to comment.