@gondel/plugin-hot
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.2.4](https://github.com/namics/gondel/compare/v1.2.3...v1.2.4) (2020-09-21) | ||
### Bug Fixes | ||
* **hot plugin:** allow passing a node module ([7be34f6](https://github.com/namics/gondel/commit/7be34f699fb4ae5dc88b530171714c3630aea8ee)) | ||
## [1.2.3](https://github.com/namics/gondel/compare/v1.2.2...v1.2.3) (2020-03-09) | ||
@@ -8,0 +19,0 @@ |
@@ -5,2 +5,5 @@ /** | ||
/// <reference types="webpack-env" /> | ||
export declare function hot(module: __WebpackModuleApi.Module): void; | ||
/** | ||
* Make Gondel Components inside this module and all its children hot replaceable | ||
*/ | ||
export declare function hot(module: __WebpackModuleApi.Module | NodeModule): void; |
@@ -6,2 +6,5 @@ /** | ||
var hotModeActivated = false; | ||
/** | ||
* Make Gondel Components inside this module and all its children hot replaceable | ||
*/ | ||
export function hot(module) { | ||
@@ -8,0 +11,0 @@ if (module.hot) { |
{ | ||
"name": "@gondel/plugin-hot", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Hot module reloading for Gondel component development", | ||
@@ -26,11 +26,11 @@ "bugs": "https://github.com/namics/gondel/issues", | ||
"devDependencies": { | ||
"@gondel/core": "^1.2.0", | ||
"@types/webpack-env": "1.14.1", | ||
"@gondel/core": "^1.2.4", | ||
"@types/webpack-env": "1.15.2", | ||
"npm-run-all": "4.1.5", | ||
"react": "16.13.0", | ||
"react-dom": "16.13.0", | ||
"rimraf": "3.0.0", | ||
"typescript": "3.7.4" | ||
"react": "16.13.1", | ||
"react-dom": "16.13.1", | ||
"rimraf": "3.0.2", | ||
"typescript": "3.9.5" | ||
}, | ||
"gitHead": "bef490988a05b052d6461d8ef2275f784df4245b" | ||
"gitHead": "4b10a14cfcb4c26c6a7c5f729512d0fcef81ac7e" | ||
} |
@@ -5,12 +5,10 @@ /** | ||
import { | ||
GondelComponent, | ||
IGondelComponent, | ||
findComponents, | ||
addGondelPluginEventListener | ||
} from "@gondel/core"; | ||
import { findComponents, addGondelPluginEventListener } from "@gondel/core"; | ||
let hotModeActivated = false; | ||
export function hot(module: __WebpackModuleApi.Module) { | ||
/** | ||
* Make Gondel Components inside this module and all its children hot replaceable | ||
*/ | ||
export function hot(module: __WebpackModuleApi.Module | NodeModule) { | ||
if (module.hot) { | ||
@@ -22,3 +20,3 @@ module.hot.accept(); | ||
hotModeActivated = true; | ||
addGondelPluginEventListener("Hot", "register", function( | ||
addGondelPluginEventListener("Hot", "register", function ( | ||
registerComponent, | ||
@@ -29,4 +27,4 @@ { componentName, namespace }, | ||
findComponents(document.documentElement, undefined, namespace) | ||
.filter(oldComponent => oldComponent._componentName === componentName) | ||
.forEach(oldComponent => { | ||
.filter((oldComponent) => oldComponent._componentName === componentName) | ||
.forEach((oldComponent) => { | ||
(oldComponent as any).__proto__ = registerComponent.prototype; | ||
@@ -33,0 +31,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7637
63