-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat: support bundling of css @import
rules
#278
Conversation
Seems like a legit feature. One thing to note that hot-reloading is not supported for @import:ed files since Nue has no way of tracking those dependencies (without writing a Lightning CSS extension, but that feels like an overkill) |
The thing about not being able to trace |
This comment was marked as off-topic.
This comment was marked as off-topic.
3d7ad17
to
10c4871
Compare
@import sounds like the right solution to include Glow styling from node_modules, instead of hacking the dependency inside nuekit |
10c4871
to
4a1e016
Compare
I'm not sure, how exactly you mean that 🤷 But just, so you know: Imports from So I don't know how exactly you would do that when |
So the syntax of importing from node_modules is something like this ? @import url("node_modules/nuekit/browser/syntax.css") And the imported CSS is always bundled inside the parent CSS regardless of where it is imported? The above would allow me to get rid of the automagical syntax.css auto-inclusion: https://github.com/nuejs/nue/blob/master/packages/nuekit/src/site.js#L279 Thanks! |
I'm not sure. Probably. It's too long in the past that I did the code changes. Also I not completely sure, what exactly you want to do. You probably can use the resolvePath from init.js to get an absolute path to the css.
|
Support bundling of
@import
rules, useful, e.g. when importing CSS fromnode_modules
TODO:
@import