I would like to use Webpack Dev Server to live reload the page, but use Local to host the WordPress install. I imagine the same solution would work for Grunt or Gulp as well with maybe slightly different configurations.
Anyone have experience getting both of these to work together?
I developed WPGulp (I think it’s the most popular gulp utility for WordPress). Take a look and use it. BrowserSync works just fine with local and WPGulp.
I’m also about to release a Webpack boilerplate to help people get started, but I am trying to not make it a stale start kit but a versioned updated utility.
And BTW we’ve been working towards an extra-ordinary new build from scratch. Which will be cached for better results, ES6 Support, and a lot more. Take a look → WPGulp 2.0 Goals + Call for Contributors! #61. Feel free to join in.
I’m also trying to setup Webpack to hot reload on my site.local address with localByFlywheel. Would you have a webpack.config.js with the proxy settings and a package.json example with the dev dependencies of a simple setup to process sass and js? Maybe a github repo to helps us out?
If you are hand building the WebPack config – that’s definitely tricky, but you’ll learn a lot! I’d say take Sage for a spin and see how you like it. There might be some gems that can be used in your own project.
Just had a look. This theme is using “webpack”: “~3.10.0”, while I’m trying to run Wenpack 4.Surprise it’s been hard to find a repo or tutorials with an example setup to use Local and Webpack dev server side by side, such popular tools. I’ll have a look at this example (quite full on!). Thanks!
I need to use Webpack 4 and Local. Could be with Webpack dev server or browsersync to hot reload. Just cannot find examples. I got as far as the proxy working, but no luck with hot reload.
If you have any repo with an example setup, it would be awesome.