cnd-webpack-hot-server v0.0.6
cnd-webpack-hot-server
Enable webpack hot reloading for cloud native development (CND). This enables other tools like React Hot Loader to tweak React components in real time in your cloud native environment.
It uses the popular express middlewares webpack-dev-middleware and webpack-hot-middleware under the hood.
Getting Started
Install the server module:
yarn add cnd-webpack-hot-server --devUsage
With the CLI
If your webpack.config.js is on the root directory of your CND environment, run:
cnd exec node_modules/cnd-webpack-hot-server/cnd-webpack-hot-server.jsYou can also the path of your config file:
cnd exec -- node_modules/cnd-webpack-hot-server/cnd-webpack-hot-server.js --config path/to/webpack.config.jsWith NPM Scripts
NPM package.json scripts are a convenient and useful means to run locally installed binaries without having to be concerned about their full paths. Simply define a script as such:
"scripts": {
"watch": "node node_modules/cnd-webpack-hot-server/cnd-webpack-hot-server.js"
}And run the following in your CND environment:
cnd exec yarn run watchThe Result
This will start a server instance in your container and begin listening for connections from
localhost on the default port 35729.