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

Source maps. #4

Open
kriskowal opened this issue Feb 28, 2015 · 1 comment
Open

Source maps. #4

kriskowal opened this issue Feb 28, 2015 · 1 comment

Comments

@kriskowal
Copy link
Member

Gutentag should generate source maps for HTML modules.

This will require support from Mr to provide an interface for creating source mappings and communicating them to the browser both in development (perhaps with a URL object generated on the fly) and in production (by allowing the bundler to write and link the maps).

This will require support from the HTML and XML parsers, to surface ___location information for each node. For this reason, and because it might be possible for HTML modules to inform the parser about how to deal with white space and custom self-closing tags, it might be desirable to create our own gutentag markup parser.

@kriskowal
Copy link
Member Author

Hint from @ForbesLindesay, https://www.npmjs.com/package/htmlparser2

This could be used to generate a DOM with source ___location annotation. That could be fed into sourcemaps. Looks like it might be possible to also modify it to support new tag semantics on the fly, e.g., autoclose hints for imported tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant