EDIT:
sorry this is stupid … I forget to add the / in:
"publicPath": "/wp-content/themes/startup",
When i run ‘npm start’ all my styles and javascript are updated but if I then re-adjust a .scss or .js file my browser reload but does not make any changes. only .php files do change. Im not using bedrock, just the sage theme.
I’m having this problem as well, and @MaxSwinkels solution (to add the watch file references) worked. @ben I wonder if there’s a bug in that part of the webpack config? I’ll do some more investigating.
Just to add to this, a weird side effect I’m seeing is that the style edits are being replayed in their entirety every time the browser reloads. So for example, if I’ve made 10 edits to a SCSS file, on the 10th save the browser reloads but plays all 9 previous edits in a quick flash before reaching the 10th. Might be because I’m now referencing the files twice with the workaround edit. Not sure really. * head scratch *
In the Jetbrains editors, you need to go into Settings -> Appearance & Behavior -> System Settings
disable “Use ‘safe write’ (save changes to a temporary file first)”
Ah man… sorry for the forum spam. The original problem has inexplicably disappeared - I removed @MaxSwinkels watch refs, and things are working fine for some reason. The flashing edits issue has gone too.
Might be time to call it a day and commit stuff before something else blows up!
I have the same problem as @MaxSwinkels but with sage@9.0.0-beta.1 and Bedrock 1.7.3.
node -v : v7.4.0 (latest as of date)
npm -v : 4.0.5 (latest as of date)
webpack 2.2.0-rc.4 (from npm install through sage theme)
npm run build works as expected npm run start runs as if there are no errors but doesn’t apply main.css or .js (they are 404)
My problem is: BrowserSync detects changes in .php-, .scss- and .js-files but only applies/compiles .php-files. Not the .css/.scss or .js-files.
My config.json at /app/themes/myers-surf/assets/config.json I have changed to this:
I have tirelessly altered port number, publicPath and proxyUrl in hope to find the problem but with no luck. The path http://localhost:3000/app/themes/myers-surf/assets/styles/main.scss returns the expected file at that path so it shouldn’t be faulty.
Also, npm run start doesn’t output a /dist folder at all. It actually removes the /dist that npm run build created. I figured out that it is CleanPlugin in /assets/build/webpack.config.js that removes it if that is any help (does not solve my problem btw).