Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

brrl -w doesn't trigger browsersync updates with WordPress projects on Windows #21

Open
bradleykirby opened this issue Mar 18, 2020 · 0 comments

Comments

@bradleykirby
Copy link

bradleykirby commented Mar 18, 2020

Problem: On a Windows/WordPress setup The brrl -w command doesn't trigger a browsersync update even though it compiles without error in response to file changes. Changes to js and css aren't reflected in the localhost site or proxied lando website as a result.

Background: lib/configure.js checks for '/wp-content/' in the webpack output path to form the public path for the api. On windows that path is backslashed in local configurations which breaks the path being fed to the webpack-dev-middleware initialization in lib/watcher.js. That in turn leads to the output files being compiled in memory at the wrong public path.

Solution: At the checkPublicPath() function in lib/configure.js use Node's path module to check for platform specific path separators then convert all backslashes to forward slashes when forming the public path.

bradleykirby added a commit to bradleykirby/barrel-cli that referenced this issue Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant