# Tailwind v2 and Sage 9

**URL:** https://discourse.roots.io/t/tailwind-v2-and-sage-9/19598
**Category:** sage
**Tags:** webpack
**Created:** 2020-11-20T20:13:45Z
**Posts:** 48
**Showing post:** 35 of 48

## Post 35 by @ciromattia — 2021-01-19T08:19:08Z

I just got an issue with sage JS route mechanism not firing when watching, it’s an issue with the vanilla JS I changed in `main.js` so if your JS isn’t working change the last snippet in `main.js` with the following:

```
if (document.readyState !== 'loading') {
  routes.loadEvents();
} else {
  document.addEventListener('DOMContentLoaded', () => {
    routes.loadEvents();
  }, false);
}
```

---

_[View the full topic](https://discourse.roots.io/t/tailwind-v2-and-sage-9/19598)._
