-
Notifications
You must be signed in to change notification settings - Fork 7
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
demo/home page greenwood Super CSS (SCSS) optimizations #74
Closed
thescientist13
wants to merge
37
commits into
feature/issue-30-home-page
from
feature/issue-30-home-page-greenwood-css-optimizations
Closed
demo/home page greenwood Super CSS (SCSS) optimizations #74
thescientist13
wants to merge
37
commits into
feature/issue-30-home-page
from
feature/issue-30-home-page-greenwood-css-optimizations
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thescientist13
changed the title
deom/home page greenwood super CSS (SCSS) optimizations
demo/home page greenwood super CSS (SCSS) optimizations
Jul 14, 2024
This was referenced Jul 15, 2024
thescientist13
changed the title
demo/home page greenwood super CSS (SCSS) optimizations
demo/home page greenwood Super CSS (SCSS) optimizations
Jul 17, 2024
This was referenced Jul 20, 2024
thescientist13
force-pushed
the
feature/issue-30-home-page
branch
from
August 12, 2024 22:20
960a5be
to
9adda75
Compare
all of this is now available as of v0.30.0-alpha.5! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Testing something related to improving:
@import
) rules during development (too)Summary of Changes
Optimizing
@import
Currently this project was using postcss-import specifically to inline
@import
rules when used within Constructable Stylesheetsbecause without it we would just have unresolved
@import
pathsand
@import
paths is not allowed in Declarative Shadow DOM"Real" Production Constructable Stylesheets
This is the real notable one, as before, our production bundling implementation actually was in-lining the contents of a Constructable Stylesheet, due just to the known limitations of what / how we thought it was possible to achieve.
However, I completely overlooked a concept often used in bundling called externals, which essentially means externalizing modules from the bundler graph, aka. just skipping over them. This is great since if we try to feed raw CSS to Rollup it will of course break since it's not JS, but with externals, we tell Rollup to ignore this and thus it will stay a CSS file in production.
For example taking this basic example
What would output before would be something like this
and now, after, it looks like this! ✨
and what's cooler, we can still re-use the original reference to something like theme.852017890.css so there is only one source of truth! which will work great with caching
TODOs
/assets
(also, should probably prefix with base) - usefileName
option inthis.emitFile
Upstreams
@import
statements) greenwood#1257Related to CSS Modules, occasionally getting this
Unexpected end of JSON input
, probably a race condition with the hacky shared module file approach I'm using, really would be nice to have a better implementation when porting