-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Sage 9-alpha.4 #1751
Sage 9-alpha.4 #1751
Conversation
Just tested this on a theme I'm working on. Javascript is loading, but for some reason styles aren't being compiled? |
I encountered an issue related to the 'stylesheet' > 'template' revision in functions.php (not using Bedrock). With the 'template' change, theme name was missing from my css/js paths. Also, image assets went missing — image file paths (which should point to '/dist/images') contained '/templates/' in the file path. When I reverted functions.php, all was well. |
@nathanielks @JonMasterson |
@QWp6t yup, I'm aware! The stylesheets weren't loaded even when visiting the proxy. I'll test a vanilla clone and see what that gives me |
Doh! Didn't notice the hook — Works great. Thanks! |
@nathanielks same problem here, let me know if you solve it! thx |
@giacomoalonzi try removing your |
@retlehs @giacomoalonzi I was already using |
Mmmm'k. Vanilla alpha4 does have the webpack jargon, so I'm believing I didn't merge everything correctly. I had a bunch of merge conflicts trying to merge 3 and 4 in an existing theme, so it was a bunch of manual merge resolution. |
Welp, insert foot into mouth. It works fine! The only difference for me is the Webpack hullabuhloo still isn't being output in |
Now, one thing that I have noticed (that's semi annoying) is that on subsequent rebuilds without refreshing the page, updated JS isn't really because the router is only loaded on document.ready() (this also existed in alpha3). @QWp6t is the solution here to have it trigger on document.ready and on rebuilds? Does HMR broadcast any events we can hook into? I'm just not sure where to start. I imagine we'll have to have some method of removing event listeners as well before the code is evaluated... |
Oh, and for whatever reason even reloading the page doesn't update the js. I have to |
I'm not sure if there's an event, but this should work:
Obviously an event would be better, though. |
Side note, this is already not compatible with |
I can't get isotope and a couple of other scripts to work with DOM ready. What was the reason for 724d550 ? |
Tested this today on a fairly big project with lots of other deps and stuff. All working good on my end! Cheers @QWp6t! |
I haven't done a whole lot of testing with this so I don't wanna push it as an update just yet.
Will do some more tests and tag a new release probably sometime this week. If all goes well with this release, then the next step is adding Blade support.
If you decide to test this, be sure to re-activate your theme.