Skip to content

Commit

Permalink
fix: dist source map file naming was incorrect (#730)
Browse files Browse the repository at this point in the history
- JS source map must be named the same as the original JS file + `.map` suffix, in our case since we have `.min.js`, we need the sourcemap to be named `.min.js.map` to be auto-detected but ours we named as `.js.map` (missing `.min` prefix and wasn't auto-detected by Chrome
  • Loading branch information
ghiscoding authored Feb 26, 2023
1 parent bb40f4d commit aa4093a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function minifyJsFiles(filenames, version) {
for (const filename of filenames) {
console.log(filename);
const writeFilePath = './dist/' + filename.replace('./', '').replace('.js', '.min.js');
const writeFileSourcePath = './dist/' + filename.replace('./', '').replace('.js', '.js.map');
const writeFileSourcePath = './dist/' + filename.replace('./', '').replace('.js', '.min.js.map');
ensureDirectoryExistence(writeFilePath);

const minifiedFile = UglifyJS.minify(
Expand Down

0 comments on commit aa4093a

Please sign in to comment.