Any build step for JavaScript files can now provide a mapping file, to allow the po[t] files to operate on the source files.
Mappings are simple JSON objects with source files as keys and one or an array of build files as values.
Currently this is done by a --use-map option, optionally with paths (delimited by ,) specified. I'm open for better names for this option as well as better ways to specify multiple values (it doesn't seem like specifying the option multiple times works, like some programs support).
Example plugin (for webpack) to produce such maps: https://github.com/cpiber/webpack-bundle-output. I intend to integrate this plugin into @wordpress/scripts if this PR goes through, if that happens, that could be added to the README.
Any build step for JavaScript files can now provide a mapping file, to allow the
po[t]
files to operate on the source files.Mappings are simple JSON objects with source files as keys and one or an array of build files as values.
Currently this is done by a
--use-map
option, optionally with paths (delimited by,
) specified. I'm open for better names for this option as well as better ways to specify multiple values (it doesn't seem like specifying the option multiple times works, like some programs support).Example plugin (for webpack) to produce such maps: https://github.com/cpiber/webpack-bundle-output. I intend to integrate this plugin into
@wordpress/scripts
if this PR goes through, if that happens, that could be added to the README.Resolves #127 Resolves #200 Resolves #282