@lynx-js/runtime-wrapper-webpack-plugin 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lynx-js/runtime-wrapper-webpack-plugin
2
2
 
3
+ ## 0.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Add `window` variable to callback argument in `background.js` and the `window` is `undefined` in Lynx. Sometimes it's useful to distinguish between Lynx and the Web. ([#248](https://github.com/lynx-family/lynx-stack/pull/248))
8
+
9
+ ```js
10
+ define('background.js', (..., window) => {
11
+ console.log(window); // `undefined` in Lynx
12
+ })
13
+ ```
14
+
3
15
  ## 0.0.8
4
16
 
5
17
  ### Patch Changes
@@ -17,6 +17,7 @@ const defaultInjectVars = [
17
17
  'Behavior',
18
18
  'LynxJSBI',
19
19
  'lynx',
20
+ 'window',
20
21
  ];
21
22
  /**
22
23
  * RuntimeWrapperWebpackPlugin adds runtime wrappers to JavaScript and allow to be loaded by Lynx.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/runtime-wrapper-webpack-plugin",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Use runtime wrapper which allow JavaScript to be load by Lynx.",
5
5
  "keywords": [
6
6
  "webpack",