The documentation refers to an inputSourceMap option available via the API to supply a source map from another compiler. This option does not appear to be available when calling lightningcss via the CLI.
Meaning that if you want to use a source map from another compiler (like a sass compiler in my case), lightningcss will either remove the sourceMappingURL when compiling the script, or if the --sourcemap option is set overwrite it with its own source map that points back to itself as the source rather than the partials it was actually compiled from.
This is a request to add inputSourceMap as a CLI option that accepts a path string to the source map file similar to the API. It would be a big help.
Thanks to all of those working on this fantastic project!
The documentation refers to an
inputSourceMapoption available via the API to supply a source map from another compiler. This option does not appear to be available when calling lightningcss via the CLI.Meaning that if you want to use a source map from another compiler (like a sass compiler in my case), lightningcss will either remove the sourceMappingURL when compiling the script, or if the
--sourcemapoption is set overwrite it with its own source map that points back to itself as the source rather than the partials it was actually compiled from.This is a request to add
inputSourceMapas a CLI option that accepts a path string to the source map file similar to the API. It would be a big help.Thanks to all of those working on this fantastic project!