-
Notifications
You must be signed in to change notification settings - Fork 4k
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
@apply doesn't work with Laravel Mix #53
Comments
Can you share a public repo that reproduces this? I would expect a different error since Are you using CSS here or Sass? |
Here's the repo: https://github.com/HapLifeMan/apply-css-not-working and I'm using CSS! |
Ah ok I've reproduced this now. The issue is that There's a couple ways to work around this:
Let me know if that fixes your issue! We'll definitely have to add some more documentation about this. |
Bug fixed! Thank you ❤️ |
I have quite large webpack.mix.js - for anyone that finds this issue, it might be helpful to know: If you have any weird problems (like your css file being literally copied and not processed) you should put that last snippet (excluding the first line) somewhere at the end of the webpack.mix.js. This did the trick for me. |
Hey @adamwathan, just noticed I think you have a minor mistake in your tip for postcss-import. You have |
Good catch, fixed! |
@adamwathan I've tried using your postcss-import method but am still getting the same issue about "missing '}'" when trying to build using @apply. webpack.mix.js
tailwind.scss
style.scss
To confirm, if I remove the @apply declaration then everything works fine... |
Can you create a public GitHub repo that reproduces the issue? I can play with it and figure it out much faster that way than having to recreate it all from scratch myself. |
I tried creating a public GitLab repo but couldn't push to it for some reason... so I've attached a zip here. I removed all sensitive info, node modules and composer packages. It's a Craft CMS site |
@adamwathan have you found what the problem with @jcush problem, please? I'm facing the same problem here. |
@thamerbelfkihthamer I haven't tried this yet, but just re-reading the issue I think in the meantime while we let @adamwathan dig into it it could be an idea to create a separate stylesheet for utilities created by applying tailwind classes, then In the nicest way possible without any offence meant to Tailwind or Adam (big Refactoring UI fan here) I'm currently customising Bootstrap 4 for theming instead. I just have more experience with it personally and wanted to crack on with the project. |
Hey,
Everything works fine until I decided to use components as it's said in the documentation.
Compiling failed :
My
wepback.mix.js
:... and
app.css
:What's wrong? :/
The text was updated successfully, but these errors were encountered: