Skip to content

Commit

Permalink
chore: copy sourcemaps to public/static/
Browse files Browse the repository at this point in the history
Because even though we're not linking to them, it appears that the
profiler (dd-trace-js) is going to look for them locally by virtue of
its dependency on this `SourceMapper` class:

- https://github.com/DataDog/pprof-nodejs/blob/012af7560c588d6604b40a86c5c80aad39d230d0/ts/src/sourcemapper/sourcemapper.ts#L152
  • Loading branch information
wincent committed Aug 14, 2024
1 parent 15b3e72 commit ca2d551
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webpack.production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ module.exports = BUILDS.map(({name, filename, targets, terserOptions}) => {
const src = path.resolve(__dirname, 'dist', asset);
const dest = path.resolve(__dirname, 'public', 'static', asset);
fse.copySync(src, dest);
if (fs.existsSync(src + '.map')) {
fse.copySync(src + '.map', dest + '.map');
}
if (fs.existsSync(src + '.LICENSE.txt')) {
fse.copySync(src + '.LICENSE.txt', dest + '.LICENSE.txt');
}
Expand Down

0 comments on commit ca2d551

Please sign in to comment.