@lynx-js/template-webpack-plugin-canary 0.8.5-canary-20250822-e968bdd6 → 0.8.5-canary-20250822-52db511f

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,11 +1,13 @@
1
1
  # @lynx-js/template-webpack-plugin
2
2
 
3
- ## 0.8.5-canary-20250822085539-e968bdd6c88dfed446105869c555c69c5952c416
3
+ ## 0.8.5-canary-20250822105222-52db511fe59430667228dee43c635839ad2a5c18
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Always inline the background script that contains rspack runtime module. ([#1582](https://github.com/lynx-family/lynx-stack/pull/1582))
8
+
7
9
  - Updated dependencies [[`aaca8f9`](https://github.com/lynx-family/lynx-stack/commit/aaca8f91d177061c7b0430cc5cb21a3602897534)]:
8
- - @lynx-js/webpack-runtime-globals@0.0.6-canary-20250822085539-e968bdd6c88dfed446105869c555c69c5952c416
10
+ - @lynx-js/webpack-runtime-globals@0.0.6-canary-20250822105222-52db511fe59430667228dee43c635839ad2a5c18
9
11
 
10
12
  ## 0.8.4
11
13
 
@@ -88,7 +88,17 @@ export class LynxEncodePluginImpl {
88
88
  const [inlinedManifest, externalManifest] = Object.entries(manifest)
89
89
  .reduce(([inlined, external], [name, content]) => {
90
90
  const assert = compilation.getAsset(name);
91
- const shouldInline = this.#shouldInlineScript(name, assert.source.size());
91
+ let chunk = null;
92
+ for (const c of compilation.chunks) {
93
+ if (c.files.has(name)) {
94
+ chunk = c;
95
+ break;
96
+ }
97
+ }
98
+ let shouldInline = true;
99
+ if (!chunk?.hasRuntime()) {
100
+ shouldInline = this.#shouldInlineScript(name, assert.source.size());
101
+ }
92
102
  if (shouldInline) {
93
103
  inlined[name] = content;
94
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/template-webpack-plugin-canary",
3
- "version": "0.8.5-canary-20250822-e968bdd6",
3
+ "version": "0.8.5-canary-20250822-52db511f",
4
4
  "description": "Simplifies creation of Lynx template files to serve your webpack bundles",
5
5
  "keywords": [
6
6
  "webpack",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@lynx-js/css-serializer": "npm:@lynx-js/css-serializer-canary@0.1.3",
36
36
  "@lynx-js/tasm": "0.0.17",
37
- "@lynx-js/webpack-runtime-globals": "npm:@lynx-js/webpack-runtime-globals-canary@0.0.6-canary-20250822-e968bdd6",
37
+ "@lynx-js/webpack-runtime-globals": "npm:@lynx-js/webpack-runtime-globals-canary@0.0.6-canary-20250822-52db511f",
38
38
  "@rspack/lite-tapable": "1.0.1",
39
39
  "css-tree": "^3.1.0",
40
40
  "object.groupby": "^1.0.3"