Hello,
I’m pretty new to Sage.
I’m doing my first Wordpress Theme from scratch but I have some issues with webpack.
It might be my own error as i’m a newbie, but i can’t figure out how to fixe it.
I do not have any errors, but, webpack doesn’t compil the scss.
In my phpstorm console I do :
wp server
PHP 7.3.5 Development Server started at Mon Oct 26 09:38:29 2020
Listening on http://localhost:8080
Document root is C:\wamp64\www\myproject
Press Ctrl-C to quit.
npm run start
sage@9.0.9 start C:\wamp64\www\myproject\wp-content\themes\mytheme
webpack --hide-modules --watch --config resources/assets/build/webpack.config.js
[HTML Injector] Running…
[Browsersync] Proxying: http://localhost:8080
[Browsersync] Access URLs:
Local: http://localhost:8080
External: http://IP:8080
UI: http://localhost:3001
UI External: http://localhost:3001
[Browsersync] Watching files…
DONE Compiled successfully in 1380ms
It does open the browser, open the project and I have all the pages I need.
then, when I change some scss or even style in views…
Let’s say in styles > layouts > _footer.scss
.page-footer {
background-color: black;
}
DONE Compiled successfully in 3192ms
But, nothing refreshing on the website ( as webpack should do, if I anderstand it well… )
However, if I stop npm run start and I start is back again, the changes work and my footer is black.
My guess is that their is a pb on the refreshing of the page, but no error message, I don’t know where to look.
More infos :
I did not touched the webpack files BUT I did have a pb to install sass with this commande :
( npm install did not work for me, he blocked on sass eveytime. )
npm install node-sass@4.12.0
I’ll take any idea…