Skip to content

support importing css into lit components, clean up rspack loaders #29

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

LeoMcA
Copy link
Member

@LeoMcA LeoMcA commented Apr 1, 2025

Adds import styles from "./foobar.css?lit" which wraps the contents of foobar.css with the lit css template tag.

Not using https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/CSSStyleSheet as it's baseline blue, and not supported in node. Not using the language feature formerly known as import assertions because typescript doesn't have support for it (for writing our module definitions).

Also changes import svg from "./foobar.svg?mdnsvg" to import svg from "./foobar.svg?lit" for consistency.

Adds support for importing svgs and getting a path to the asset location like import path from "./foobar.svg"

Copy link
Contributor

github-actions bot commented Apr 1, 2025

f8bca4d was deployed to: https://fred-pr29.review.mdn.allizom.net/

@LeoMcA LeoMcA merged commit 86e7475 into main Apr 1, 2025
3 checks passed
@LeoMcA LeoMcA deleted the css-import-lit branch April 1, 2025 14:09
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.

1 participant