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

CSS sourcemaps #698

Merged
merged 9 commits into from
Jul 10, 2017
Merged

CSS sourcemaps #698

merged 9 commits into from
Jul 10, 2017

Conversation

Rich-Harris
Copy link
Member

The immediate goal of this PR is to add support for CSS sourcemaps. The approach I'm taking is to move all the CSS logic into a new Stylesheet class, which is responsible for creating/transforming a separate MagicString instance.

This will make it a bit easier to remove unused rules altogether, and do e.g. whitespace removal. Ultimately we could even have multiple stylesheets attached to a component (for example, if a component had two or more <link rel='stylesheet'> tags, if we get round to that).

@Rich-Harris Rich-Harris changed the title [WIP] CSS sourcemaps CSS sourcemaps Jul 8, 2017
@Rich-Harris
Copy link
Member Author

Removing the [WIP]. Not addressed here — how to generate a sourcemap for concatenated CSS files (e.g. the CSS bundle generated by rollup-plugin-svelte). Probably outside Svelte's remit, though it's a little annoying to have to keep decoding, manipulating, combining and reencoding sourcemap mappings. (Sourcemaps are a pain.)

@Rich-Harris Rich-Harris merged commit f0fddaa into master Jul 10, 2017
@Rich-Harris Rich-Harris deleted the gh-691 branch July 10, 2017 11:56
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

Successfully merging this pull request may close these issues.

None yet

1 participant