-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bundling mechanism for globals injection caching
This contains the required changes for the openhab-js injection caching inside the JS Scripting addon. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- Loading branch information
1 parent
6c6433b
commit 7c7588e
Showing
3 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Injection of openhab-js namespaces as globals inside the addon | ||
|
||
(function (global) { | ||
'use strict'; | ||
Object.assign(globalThis, require('./index')); | ||
// Support legacy NodeJS libraries | ||
globalThis.global = globalThis; | ||
})(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters