-
Notifications
You must be signed in to change notification settings - Fork 361
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
(crl fork) where is the css output for sass? #718
Comments
Hi there! Just a heads up - there's no such thing as a CSS import yet, that's something bundlers invented that hasn't been standardized (it's being worked on, but there's a lot of issues to sort out). By default, Microbundle will compile your CSS to import 'my-awesome-lib/dist/my-awesome-lib.css'; If you're running your example in a bundler, you'll need <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/node_modules/my-awesome-lib/dist/my-awesome-lib.css">
</head>
<body>
<script src="/node_modules/my-awesome-lib/dist/index.modern.js"></script>
</body>
</html> |
@developit Thanks for answering me. Really. 😃 (First, I guess I'm starting to question if opening an issue here is indeed the bast place. You see, I came from microbundle-crl on NPM and the issue page was here. But anyway.) I'm sorry, I guess I'm being dumb, but I can't understand exactly what you're saying. I just bootstrapped a lib with I'm believing now that the original In any case, I'll be closing the issue soon. Thanks again for answering me. |
No problem - tbh you're in the right place. I just set up a test repo, and I can confirm that the compiled FWIW you should be able to do |
Googling sass/scss and microbundle brought me here, and I haven't found anything else that describes how to use sass with microbundle. @Mazuh implied he found some documentation, but I can't seem to find it. What is the expected way to use sass with microbundled javascript?
I'm actually trying to have some local sass and I'd really like to do this right, from the start rather than trying to kludge something together, so any pointers would be appreciated. Maybe eventually a section in the readme doc if this isn't out of scope for microbundle? Edit: I'm starting to figure some of this out.
Any of the above may be wrong, but so far it is what seems to be working |
@mlippert your layout sounds correct, and we will hopefully have a fix for the CSS Modules thing soon (though you'll have to wait for it to be backported to microbundle-crl). |
I tried again and sass is now working fine. Maybe something went wrong with the version I was using. Closing the issue here. |
@Mazuh can you tell me your sass version! thanks! |
But I found few issues with microbundle-crl with missing images as "background-image:url(fullscreen.png);" there are no folders for static assets. |
Question!
I installed
sass
as suggested, it appears to be working (if I type something wrong in the style file, there's an output for it)... but I don't know how my example can import the created.css
bundles.In the lib, here's a illustrative example of the
.scss
and.tsx
:Output of
yarn start
:And in the example:
The example app is just plain HTML, cause I don't know how to import the compiled styles.
Any advices on how to make this work?
The text was updated successfully, but these errors were encountered: