Socket
Socket
Sign inDemoInstall

node-hot-loader

Package Overview
Dependencies
179
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.0 to 1.11.1

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## <small>1.11.1 (2018-08-30)</small>
* Fix launch script in current process ([54357ea](https://github.com/vlazh/node-hot-loader/commit/54357ea))
* Refactor dynamic imports ([27cbdaf](https://github.com/vlazh/node-hot-loader/commit/27cbdaf))
* Update deps ([0ae203f](https://github.com/vlazh/node-hot-loader/commit/0ae203f))
* Update README.md with Docker troubleshooting info ([cbdd489](https://github.com/vlazh/node-hot-loader/commit/cbdd489))
## 1.11.0 (2018-08-30)

@@ -2,0 +11,0 @@

2

examples/simple-example/package.json

@@ -14,3 +14,3 @@ {

"devDependencies": {
"node-hot-loader": "^1.10.1",
"node-hot-loader": "^1.11.0",
"rimraf": "^2.6.2",

@@ -17,0 +17,0 @@ "webpack": "^4.17.1",

@@ -163,3 +163,3 @@ "use strict";

// Require in current process to lauch script.
import(getLauncherFileName()).then(() => {
Promise.resolve().then(() => require(`${getLauncherFileName()}`)).then(() => {
this.context.serverProcess = process;

@@ -166,0 +166,0 @@ }).catch(err => {

@@ -88,3 +88,3 @@ "use strict";

function hooks(compiler, options) {
return import('./HmrServer').then(({
return Promise.resolve().then(() => require('./HmrServer')).then(({
default: HmrServer

@@ -98,3 +98,3 @@ }) => new HmrServer({ ...options,

function loader(options) {
Promise.resolve().then(() => import('babel-register')).then(() => import(options.config)).then(module => tweakWebpackConfig(module)).then(webpackConfig => (0, _webpack.default)(webpackConfig)).then(compiler => hooks(compiler, options)).catch(err => console.error(err));
Promise.resolve().then(() => require('@babel/register')).then(() => require(`${options.config}`)).then(module => tweakWebpackConfig(module)).then(webpackConfig => (0, _webpack.default)(webpackConfig)).then(compiler => hooks(compiler, options)).catch(err => console.error(err));
}
{
"name": "node-hot-loader",
"version": "1.11.0",
"version": "1.11.1",
"description": "Hot module replacement for Node.js applications",

@@ -68,3 +68,2 @@ "main": "./lib/node-hot.js",

"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/preset-env": "^7.0.0",

@@ -71,0 +70,0 @@ "@types/webpack-env": "^1.13.6",

@@ -82,2 +82,19 @@ # Node Hot Loader [![npm package](https://img.shields.io/npm/v/node-hot-loader.svg?style=flat-square)](https://www.npmjs.org/package/node-hot-loader)

## Troubleshooting
### Running **Node Hot Loader** inside a Docker container
If you attempt to run the **Node Hot Loader** inside a Docker container, it will start and serve as expected, but will not Hot Module Reload without some additional configuration. Add the following to your webpack config:
```javascript
module.exports = {
//...
watchOptions: {
poll: 1000 // Check for changes every second
}
};
```
This instructs webpack to poll for changes (every second) instead of watching. This is necessary because watching does not work with NFS and machines in VirtualBox. See [Webpack Configuration](https://webpack.js.org/configuration/watch/#watchoptions-poll) docs for more information.
## Express Hot Reload Example

@@ -84,0 +101,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc