I'm developing a local npm package called 'theme' in a server side rendered react, node.js app called cezerin(https://github.com/cezerin/cezerin/issues/560).
Currently it's running with pm2 both api, storefront and it's watching file changes in local package theme. However, it doesn't restart the server automatically when I change the look by changing the code in the theme.
{
"apps": [
{
"name": "api",
"cwd": "./src/api/server",
"args": [],
"script": "index.js",
"node_args":"cross-env NODE_ENV=development",
"watch": ["./config/server.js", "./src/api/server/"],
"instances": "1",
"exec_mode": "fork",
"watch_options": {
"persistent": true,
"ignoreInitial": false
}
},
{
"name": "store",
"cwd": "./src/store/server",
"args": [],
"script": "index.js",
"node_args":"cross-env NODE_ENV=development",
"watch": [
"./config/server.js",
"./store/",
"./theme/",
"./theme/assets/index.html"
],
"instances": "1",
"exec_mode": "fork",
"watch_options": {
"persistent": true,
"ignoreInitial": false
}
}
]
}
How does everyone set up development mode when you want to see the change instantly as you change the code in local theme that you are developing?