@lynx-js/external-bundle-rsbuild-plugin-canary 0.0.1 → 0.0.2-canary-20260126-c691f87a

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,14 @@
1
1
  # @lynx-js/external-bundle-rsbuild-plugin
2
2
 
3
+ ## 0.0.2-canary-20260126040139-c691f87a04693fedfdd15d2f7841e2b61339112b
4
+
5
+ ### Patch Changes
6
+
7
+ - Add [`globalObject`](https://webpack.js.org/configuration/output/#outputglobalobject) config for external bundle loading, user can configure it to `globalThis` for BTS external bundle sharing. ([#2123](https://github.com/lynx-family/lynx-stack/pull/2123))
8
+
9
+ - Updated dependencies [[`959360c`](https://github.com/lynx-family/lynx-stack/commit/959360c82431669eb3adb5acc7a86177ce1d082c)]:
10
+ - @lynx-js/externals-loading-webpack-plugin@0.0.3-canary-20260126040139-c691f87a04693fedfdd15d2f7841e2b61339112b
11
+
3
12
  ## 0.0.1
4
13
 
5
14
  ### Patch Changes
@@ -8,8 +17,8 @@
8
17
 
9
18
  ```ts
10
19
  // lynx.config.ts
11
- import { pluginExternalBundle } from '@lynx-js/external-bundle-rsbuild-plugin'
12
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
20
+ import { pluginExternalBundle } from "@lynx-js/external-bundle-rsbuild-plugin";
21
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
13
22
 
14
23
  export default {
15
24
  plugins: [
@@ -17,14 +26,14 @@
17
26
  pluginExternalBundle({
18
27
  externals: {
19
28
  lodash: {
20
- url: 'http://lodash.lynx.bundle',
21
- background: { sectionPath: 'background' },
22
- mainThread: { sectionPath: 'mainThread' },
29
+ url: "http://lodash.lynx.bundle",
30
+ background: { sectionPath: "background" },
31
+ mainThread: { sectionPath: "mainThread" },
23
32
  },
24
33
  },
25
34
  }),
26
35
  ],
27
- }
36
+ };
28
37
  ```
29
38
 
30
39
  - Updated dependencies [[`491c5ef`](https://github.com/lynx-family/lynx-stack/commit/491c5efac23e3c99914fb9270d0476aa5c0207f9)]:
package/lib/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import type { ExternalsLoadingPluginOptions } from '@lynx-js/externals-loading-w
10
10
  *
11
11
  * @public
12
12
  */
13
- export type PluginExternalBundleOptions = Pick<ExternalsLoadingPluginOptions, 'externals'>;
13
+ export type PluginExternalBundleOptions = Pick<ExternalsLoadingPluginOptions, 'externals' | 'globalObject'>;
14
14
  /**
15
15
  * Create a rsbuild plugin for loading external bundles.
16
16
  *
package/lib/index.js CHANGED
@@ -47,6 +47,7 @@ export function pluginExternalBundle(options) {
47
47
  backgroundLayer: LAYERS.BACKGROUND,
48
48
  mainThreadLayer: LAYERS.MAIN_THREAD,
49
49
  externals: options.externals,
50
+ globalObject: options.globalObject,
50
51
  }));
51
52
  return config;
52
53
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lynx-js/external-bundle-rsbuild-plugin-canary",
3
- "version": "0.0.1",
4
- "description": "A rsbuild plugin for loading lynx external bundles.",
3
+ "version": "0.0.2-canary-20260126-c691f87a",
4
+ "description": "An rsbuild plugin for loading lynx external bundles.",
5
5
  "keywords": [
6
6
  "rsbuild",
7
7
  "Lynx",
@@ -34,11 +34,11 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@lynx-js/externals-loading-webpack-plugin": "npm:@lynx-js/externals-loading-webpack-plugin-canary@0.0.2"
37
+ "@lynx-js/externals-loading-webpack-plugin": "npm:@lynx-js/externals-loading-webpack-plugin-canary@0.0.3-canary-20260126-c691f87a"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@microsoft/api-extractor": "7.55.2",
41
- "@rsbuild/core": "1.6.13"
41
+ "@rsbuild/core": "1.7.2"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=18"