@lynx-js/template-webpack-plugin-canary 0.6.8-canary-20250405-bb049603 → 0.6.9-canary-20250407-12e3afe1

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,6 +1,14 @@
1
1
  # @lynx-js/template-webpack-plugin
2
2
 
3
- ## 0.6.8-canary-20250405131855-bb049603e76d9eaa956f921ac5cfffed22e32e31
3
+ ## 0.6.9-canary-20250407144201-12e3afe14fa46bbec817bed48b730798f777543c
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix source-maps (`.js.map` files) were not accessible in the `compiler.hooks.afterEmit` hook. ([#498](https://github.com/lynx-family/lynx-stack/pull/498))
8
+
9
+ - Fix incorrect hash of `background.[contenthash].js` in `.lynx.bundle` files. ([#498](https://github.com/lynx-family/lynx-stack/pull/498))
10
+
11
+ ## 0.6.8
4
12
 
5
13
  ### Patch Changes
6
14
 
@@ -96,14 +96,13 @@ export class LynxEncodePluginImpl {
96
96
  const { encodeData } = args;
97
97
  const { manifest } = encodeData;
98
98
  if (!isDebug() && !isDev && !isRsdoctor()) {
99
- templateHooks.beforeEmit.tap(this.name, (args) => {
99
+ compiler.hooks.afterEmit.tap(this.name, () => {
100
100
  this.deleteDebuggingAssets(compilation, [
101
101
  encodeData.lepusCode.root,
102
102
  ...encodeData.lepusCode.chunks,
103
103
  ...Object.keys(manifest).map(name => ({ name })),
104
104
  ...encodeData.css.chunks,
105
105
  ]);
106
- return args;
107
106
  });
108
107
  }
109
108
  encodeData.manifest = {
@@ -158,7 +158,7 @@ class LynxTemplatePluginImpl {
158
158
  * and source-map is generated
159
159
  */
160
160
  compiler.webpack.Compilation
161
- .PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE,
161
+ .PROCESS_ASSETS_STAGE_OPTIMIZE_HASH,
162
162
  }, () => {
163
163
  return this.#generateTemplate(compiler, compilation, filename);
164
164
  });
@@ -187,9 +187,10 @@ class LynxTemplatePluginImpl {
187
187
  /**
188
188
  * Generate the html after minification and dev tooling is done
189
189
  * and source-map is generated
190
+ * and real content hash is generated
190
191
  */
191
192
  compiler.webpack.Compilation
192
- .PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE,
193
+ .PROCESS_ASSETS_STAGE_OPTIMIZE_HASH,
193
194
  }, async () => {
194
195
  await this.#generateAsyncTemplate(compilation);
195
196
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/template-webpack-plugin-canary",
3
- "version": "0.6.8-canary-20250405-bb049603",
3
+ "version": "0.6.9-canary-20250407-12e3afe1",
4
4
  "description": "Simplifies creation of Lynx template files to serve your webpack bundles",
5
5
  "keywords": [
6
6
  "webpack",
@@ -40,12 +40,12 @@
40
40
  "object.groupby": "^1.0.3"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "7.52.2",
43
+ "@microsoft/api-extractor": "7.52.3",
44
44
  "@types/css-tree": "^2.3.10",
45
45
  "@types/object.groupby": "^1.0.4",
46
46
  "webpack": "^5.98.0",
47
- "@lynx-js/test-tools": "0.0.0",
48
- "@lynx-js/vitest-setup": "0.0.0"
47
+ "@lynx-js/vitest-setup": "0.0.0",
48
+ "@lynx-js/test-tools": "0.0.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=18"