@lynx-js/template-webpack-plugin-canary 0.6.8 → 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 +11 -3
- package/lib/LynxEncodePlugin.js +1 -2
- package/lib/LynxTemplatePlugin.js +3 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @lynx-js/template-webpack-plugin
|
|
2
2
|
|
|
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
|
+
|
|
3
11
|
## 0.6.8
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -35,7 +43,7 @@
|
|
|
35
43
|
- Add `defaultOverflowVisible` option to `LynxTemplatePlugin`. ([#78](https://github.com/lynx-family/lynx-stack/pull/78))
|
|
36
44
|
|
|
37
45
|
```js
|
|
38
|
-
import { LynxTemplatePlugin } from
|
|
46
|
+
import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
|
|
39
47
|
|
|
40
48
|
new LynxTemplatePlugin({
|
|
41
49
|
defaultOverflowVisible: false,
|
|
@@ -54,10 +62,10 @@
|
|
|
54
62
|
- 1abf8f0: Add `entryNames` parameter to `beforeEncode` hook.
|
|
55
63
|
|
|
56
64
|
```js
|
|
57
|
-
import { LynxTemplatePlugin } from
|
|
65
|
+
import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
|
|
58
66
|
|
|
59
67
|
const hooks = LynxTemplatePlugin.getLynxTemplatePluginHooks(compilation);
|
|
60
|
-
hooks.beforeEncode.tap(
|
|
68
|
+
hooks.beforeEncode.tap("MyPlugin", ({ entryNames }) => {
|
|
61
69
|
console.log(entryNames);
|
|
62
70
|
});
|
|
63
71
|
```
|
package/lib/LynxEncodePlugin.js
CHANGED
|
@@ -96,14 +96,13 @@ export class LynxEncodePluginImpl {
|
|
|
96
96
|
const { encodeData } = args;
|
|
97
97
|
const { manifest } = encodeData;
|
|
98
98
|
if (!isDebug() && !isDev && !isRsdoctor()) {
|
|
99
|
-
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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.
|
|
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,7 +40,7 @@
|
|
|
40
40
|
"object.groupby": "^1.0.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@microsoft/api-extractor": "7.52.
|
|
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",
|