Skip to content

Commit 4ed1276

Browse files
authored
Make note of SassC::SyntaxError issue
1 parent 2a17da2 commit 4ed1276

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Or, in Rails 7+, you can preconfigure your new application to use a specific bun
3434

3535
If you want to use `@import` statements as part of your Tailwind application.js file, you need to [configure Tailwind to use `postcss` and then `postcss-import`](https://tailwindcss.com/docs/using-with-preprocessors#build-time-imports). But you should also consider simply referring to your other CSS files directly, instead of bundling them all into one big file. It's better for caching, and it's simpler to setup. You can refer to other CSS files by expanding the `stylesheet_link_tag` in `application.html.erb` like so: `<%= stylesheet_link_tag "application", "other", "styles", "data-turbo-track": "reload" %>`.
3636

37+
### How do I avoid SassC::SyntaxError exceptions on existing projects?
38+
39+
Some CSS packages use new CSS features that are not supported by the default SassC rails integration that previous versions of Rails used. If you hit such an incompatibility, it'll likely be in the form of a `SassC::SyntaxError` when running `assets:precompile`. The fix is to `bundle remove sass-rails` (or `sassc-rails`, if you were using that).
3740

3841
## License
3942

0 commit comments

Comments
 (0)