Setup with ddev
Recommended way to run BrowserSync when using ddev
Last updated
Was this helpful?
Recommended way to run BrowserSync when using ddev
Last updated
Was this helpful?
Even though this is not necessary to run the node commands through ddev
, there are some use cases that justifies it.
There's a good blog post called by Kent Richards that you can read but here's the gist:
Steps:
First set your nodejs_version
to `lts/iron`
so it is the same as your version defined in .nvmrc
in the sub-theme
Then re-run your ddev
:
For ease of use, you can define a ddev command
in .ddev/commands/web/
and create a watch
file (no extension needed) with the following:
Once that's done you can run the watch command with: ddev theme:watch THEME_NAME
. You may also create other commands if you need them accordingly.
Special thanks to Nathan Kendall, Kent Richards and others in