Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix broken sourcemap comment generation for .css files #492

Merged
merged 1 commit into from Dec 14, 2021

Commits on Dec 14, 2021

  1. Fix broken sourcemap comment generation for .css files

    At the moment `.css` files generated when the `sourcemap` flag is `true` have a sourcemap comment at the bottom of the file that makes the file invalid:
    
    `//# sourceMappingURL=index.css.map`
    
    As indicated in the MDN [docs](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map) and the [specification](https://sourcemaps.info/spec.html#h.lmz475t4mvbx) for source map, the comment pointing to the source map for CSS files needs to use the `/*# sourceMappingURL=/path/to/sourcemap.map */` syntax.
    
    This PR should create a valid sourcemap comment for both `.css` and `.js` files. Feel free to adjust the code to fit whatever style makes the most sense for your library.
    Jastor11 committed Dec 14, 2021
    Copy the full SHA
    beb825b View commit details
    Browse the repository at this point in the history