-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix css import with webpack #25
base: main
Are you sure you want to change the base?
Conversation
Thanks for this. I really have no idea what I'm doing with I'll try this on my own app (which use import-maps) to check it keeps working. |
@airblade Any chance you've had time to try this out with Other libraries we use seem to use the |
@Zajn I haven't tried it out yet. Thanks for the link to trix's package.json. I see they also have Given that import maps are a Javascript feature rather than CSS, how do you plan to use/reference the datepicker's CSS? |
The project I'm working on isn't using import maps. We're using I was asking about import maps since it sounded like you used them and were waiting to see how this PR would affect projects that use it! |
Oh, I see. I do use import maps but I don't use any kind of CSS bundling; I copy-paste the CSS from any client-side packages I install (usually only this one) into my Rails app. Which is a bit hacky but better than the complexity of CSS bundling. |
Hello,
Actually, when i try to import the css with webpack encore, i got the error :
Module not found: Error: Package path ./css/datepicker.css is not exported from package node_modules/stimulus-datepicker (see exports field in node_modules/stimulus-datepicker/package.json)
Change
"exports": "./src/datepicker.js",
to
Fix this issue for me but i don't know how i can run your tests :/
So i open this pr if it can help someone :)
Thx Calunia