I am building a package and using Yalc I am publishing it in my local. My scenario is that I want a Hot Module Replacement in the package and the consuming application should automatically detect the changes.
What I have tried is that in my custom package created a watch command in package.json
I am building a package and using Yalc I am publishing it in my local. My scenario is that I want a Hot Module Replacement in the package and the consuming application should automatically detect the changes.
What I have tried is that in my custom package created a watch command in
package.json
"watch": "webpack --watch",
In webpack.config.js
Then in my application directory in package.json added a custom
nodemon
command"start:nodemon": "nodemon --exec 'webpack serve --env standalone'",
Application webpack.config.js
The changes are not reflected while the file is saved in the package directory. But if I stop and start the
start:nodemon
process it is working fine.