Our front-end build pipeline (rails, sprockets, webpack) produces map files with filenames like [name].js-[digest].map. This is also true of an out-of-the-box installation of a rails app created with rails new -j webpack.
Add an optional glob argument to getMatchingSourcemapFiles() that is used to get the sourcemap files from the given folder. The glob pattern can be passed in from the command line for users whose frontend pipeline creates sourcemap files with a different filename.
Another option is to loosen up the existing glob pattern with something that will always match the current one, so it's backwards compatible (e.g. **/*.js*.map)
Feature request description
Our front-end build pipeline (rails, sprockets, webpack) produces map files with filenames like
[name].js-[digest].map
. This is also true of an out-of-the-box installation of a rails app created withrails new -j webpack
.These filenames aren't seen as valid map files by the
getMatchingSourcemapFiles()
method inupload.ts
.Solution
Add an optional glob argument to
getMatchingSourcemapFiles()
that is used to get the sourcemap files from the given folder. The glob pattern can be passed in from the command line for users whose frontend pipeline creates sourcemap files with a different filename.e.g.
Additional context
Another option is to loosen up the existing glob pattern with something that will always match the current one, so it's backwards compatible (e.g.
**/*.js*.map
)I'd be happy to prepare a PR for this.
Command
sourcemaps