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

Sourcemapping URL #3

Open
divmain opened this issue Mar 12, 2016 · 2 comments
Open

Sourcemapping URL #3

divmain opened this issue Mar 12, 2016 · 2 comments

Comments

@divmain
Copy link
Member

divmain commented Mar 12, 2016

Transform generateRawBundles such that any bundles (that are generated with a source map) have the path to the source-map appended as a comment at the end of the generated source.

It will look something like this:

// ... generated source code
//# sourceMappingURL=/path/to/file.js.map

It may be worth splitting the code generation piece out into a separate pluggable, so that it is easier to override when a map is returned. If that is the direction that is taken, that new pluggable should be transformed instead of generateRawBundles.

The plugin itself should probably take a config format, so that the path can be customized. This could use string-pattern replacement, regex, or whatever provides the cleanest API.

@divmain
Copy link
Member Author

divmain commented Apr 6, 2016

Since this is such a simple plugin, it may be better to provide this as an example in a "cookbook" section of documentation.

@divmain
Copy link
Member Author

divmain commented Sep 13, 2016

It is probably worth adding this as default functionality, and exposing the sourceMappingURL path generation as a pluggable. As it is, source-maps are generated but they're not consumed by the browser because sourceMappingURL is missing from the end of the file. Exposing it as a pluggable will make it easy for users to setup custom mappings to accommodate their use-case.

@divmain divmain added the next label Sep 13, 2016
@divmain divmain changed the title Sourcemapping URL plugin Sourcemapping URL Sep 18, 2016
@divmain divmain added in progress and removed next labels Sep 18, 2016
@divmain divmain added next and removed in progress labels Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant