Wondering if anyone could point me in the right direction for adapting the Webpack build for Sage 8.4.
There has been an issue with the souce mapping and sass. The earlier solution of rolling back to glup-sass 2.3.2 no longer works, because there is now a bug installing that.
Iāve had luck simply copying across the latest gulpfile.js and amending the existing package.json with the more recent dependencies. This allowed me to update an old preject very recently.
Even the 8.5.3 package.json dependencies is giving me the ānode-sass@3.13.1ā error. I have a work around, but iām looking for a more stable future proof solution.
Another option is to use Laravel Mix which is a stand-alone wrapper for Webpack. It has a fluent API for defining basic webpack build steps for 80% of your use cases.
There is a great example of Mix in a project on GitHub, while geared at Sage9, has the following webpack.mix.js file:
You can mix, compile, bundle, post-process, browser-sync, proxy, and more from one file. Whatever your gulp flow was in 8.4, you can easily adapt to Laravel Mix.
This project on GitHub uses Laravel Mix, VueJS, with an option for WPGlide.
I donāt recommend trying to do a major change to your build process if youāre already working on a Sage site before version 9.
If you are having issues with anything to do with Node, those should all be solvable a lot quicker than trying to replace gulp + bower + asset-builder with something else.
There is no reason why you shouldnāt be able to use any version of Sage (including versions of Roots with Grunt) years down the line.
Without more information on this itās hard to help you.
@Christopher_Murphy did you have any luck adapting webpack for Sage 8.*? Iāve managed to drop in v9ās build components and it works beautifullyā¦the only thing left is to figure out how to enqueue css and js with the handy versioned filenames created with yarn build:productionā¦I canāt figure out how itās done.
I really like Sage Starter Theme and Webpack with HMR module to speed up my working, I combine them and proposal a boilerplate at here https://github.com/lbngoc/sage-8-webpack