Skip to content
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

Merged
merged 15 commits into from
Nov 17, 2016
Merged

Sage 9-alpha.4 #1751

merged 15 commits into from
Nov 17, 2016

Conversation

QWp6t
Copy link
Member

@QWp6t QWp6t commented Nov 7, 2016

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.

@QWp6t
Copy link
Member Author

QWp6t commented Nov 7, 2016

This PR closes: #1715, #1719, #1739, #1741, #1742, #1743

@nathanielks
Copy link

Just tested this on a theme I'm working on. Javascript is loading, but for some reason styles aren't being compiled?

@JonMasterson
Copy link

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.

@QWp6t
Copy link
Member Author

QWp6t commented Nov 8, 2016

@nathanielks
If you mean they're not written to your filesystem when you do npm start, that's because they're in webpack's internal filesystem, which sits in memory. This is faster. When you visit the proxy server, they should still be served.

@JonMasterson
You just have to reactivate your theme. That will solve your issue.

@nathanielks
Copy link

@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

@JonMasterson
Copy link

Doh! Didn't notice the hook — Works great. Thanks!

@giacomoalonzi
Copy link

@nathanielks same problem here, let me know if you solve it! thx

@retlehs
Copy link
Member

retlehs commented Nov 15, 2016

@giacomoalonzi try removing your node_modules directory and switching to yarn

@nathanielks
Copy link

@retlehs @giacomoalonzi I was already using yarn and nuked node_modules to no avail... an interesting clue is the output for yarn start in alpha4 for me does not include any of the standard Webpack jargon and doesn't appear to run anything when I save a file that would trigger an update in alpha3.

@nathanielks
Copy link

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.

@nathanielks
Copy link

Welp, insert foot into mouth. It works fine! The only difference for me is the Webpack hullabuhloo still isn't being output in yarn start, but it does in fact perform updates in the browser.

@nathanielks
Copy link

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...

@nathanielks
Copy link

Oh, and for whatever reason even reloading the page doesn't update the js. I have to ctrl-c yarn start and restart it to get the updates in the browser.

@QWp6t
Copy link
Member Author

QWp6t commented Nov 15, 2016

@nathanielks

I'm not sure if there's an event, but this should work:

if (module.hot) {
  new Router(routes).loadEvents();
}

Obviously an event would be better, though.

@derkjn
Copy link
Contributor

derkjn commented Nov 15, 2016

Side note, this is already not compatible with webpack@2.1.0-beta.26. See here.
The package.json should be updated accordingly.

@wassim
Copy link

wassim commented Nov 15, 2016

I can't get isotope and a couple of other scripts to work with DOM ready. What was the reason for 724d550 ?

@derkjn
Copy link
Contributor

derkjn commented Nov 16, 2016

Tested this today on a fairly big project with lots of other deps and stuff. All working good on my end! Cheers @QWp6t!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants