You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Support for Dynamic Source Map URL Generation Using Placeholders
Hi,
Thank you for creating terser-glob. It perfectly meets my needs for JavaScript minification across multiple files. However, I’ve encountered a limitation with source map handling that I’d like to propose as an enhancement.
Use Case
I’m working with an ESM project where main.js dynamically imports several chunk files. Each file is generated by Rollup with its corresponding source map. When using terser directly, it’s possible to define a custom sourceMap.url for each file. However, this flexibility is not currently available in terser-glob.
Feature Request
It would be highly beneficial if terser-glob supported dynamic source map URL generation by allowing placeholders, such as {file}, in the sourceMap.url configuration. This would make it possible to define file-specific source map URLs during batch minification.
Feature Request: Support for Dynamic Source Map URL Generation Using Placeholders
Hi,
Thank you for creating
terser-glob
. It perfectly meets my needs for JavaScript minification across multiple files. However, I’ve encountered a limitation with source map handling that I’d like to propose as an enhancement.Use Case
I’m working with an ESM project where
main.js
dynamically imports several chunk files. Each file is generated by Rollup with its corresponding source map. When usingterser
directly, it’s possible to define a customsourceMap.url
for each file. However, this flexibility is not currently available interser-glob
.Feature Request
It would be highly beneficial if
terser-glob
supported dynamic source map URL generation by allowing placeholders, such as{file}
, in thesourceMap.url
configuration. This would make it possible to define file-specific source map URLs during batch minification.Example Configuration
In this example,
[file]
would be replaced by the current file name being processed (e.g.,main.js
would result inmain.js.map
).Benefits
I believe this feature would significantly enhance the usability of terser-glob for modern JavaScript workflows.
Thanks for considering this enhancement and best regards!
The text was updated successfully, but these errors were encountered: