@lynx-js/template-webpack-plugin-canary 0.9.2 → 0.10.0-canary-20251208-a01fa58b
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 +13 -7
- package/lib/LynxTemplatePlugin.d.ts +1 -0
- package/lib/LynxTemplatePlugin.js +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @lynx-js/template-webpack-plugin
|
|
2
2
|
|
|
3
|
+
## 0.10.0-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Merge all css chunk and generate a `.css.hot-update.json` file for each bundle. ([#1965](https://github.com/lynx-family/lynx-stack/pull/1965))
|
|
8
|
+
|
|
3
9
|
## 0.9.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -92,16 +98,16 @@
|
|
|
92
98
|
type InlineChunkConfig =
|
|
93
99
|
| boolean
|
|
94
100
|
| InlineChunkTest
|
|
95
|
-
| { enable?: boolean |
|
|
101
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
96
102
|
```
|
|
97
103
|
|
|
98
104
|
```ts
|
|
99
|
-
import { defineConfig } from
|
|
105
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
100
106
|
|
|
101
107
|
export default defineConfig({
|
|
102
108
|
output: {
|
|
103
109
|
inlineScripts: ({ name, size }) => {
|
|
104
|
-
return name.includes(
|
|
110
|
+
return name.includes("foo") && size < 1000;
|
|
105
111
|
},
|
|
106
112
|
},
|
|
107
113
|
});
|
|
@@ -151,7 +157,7 @@
|
|
|
151
157
|
example:
|
|
152
158
|
|
|
153
159
|
```js
|
|
154
|
-
import { defineConfig } from
|
|
160
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
155
161
|
|
|
156
162
|
export default defineConfig({
|
|
157
163
|
output: {
|
|
@@ -246,7 +252,7 @@
|
|
|
246
252
|
- Add `defaultOverflowVisible` option to `LynxTemplatePlugin`. ([#78](https://github.com/lynx-family/lynx-stack/pull/78))
|
|
247
253
|
|
|
248
254
|
```js
|
|
249
|
-
import { LynxTemplatePlugin } from
|
|
255
|
+
import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
|
|
250
256
|
|
|
251
257
|
new LynxTemplatePlugin({
|
|
252
258
|
defaultOverflowVisible: false,
|
|
@@ -265,10 +271,10 @@
|
|
|
265
271
|
- 1abf8f0: Add `entryNames` parameter to `beforeEncode` hook.
|
|
266
272
|
|
|
267
273
|
```js
|
|
268
|
-
import { LynxTemplatePlugin } from
|
|
274
|
+
import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
|
|
269
275
|
|
|
270
276
|
const hooks = LynxTemplatePlugin.getLynxTemplatePluginHooks(compilation);
|
|
271
|
-
hooks.beforeEncode.tap(
|
|
277
|
+
hooks.beforeEncode.tap("MyPlugin", ({ entryNames }) => {
|
|
272
278
|
console.log(entryNames);
|
|
273
279
|
});
|
|
274
280
|
```
|
|
@@ -388,6 +388,7 @@ class LynxTemplatePluginImpl {
|
|
|
388
388
|
mainThreadAssets: [lepusCode.root, ...encodeData.lepusCode.chunks]
|
|
389
389
|
.filter(i => i !== undefined),
|
|
390
390
|
cssChunks: assetsInfoByGroups.css,
|
|
391
|
+
entryNames,
|
|
391
392
|
});
|
|
392
393
|
compilation.emitAsset(filename, new RawSource(template, false));
|
|
393
394
|
if (isDebug() || isDev) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/template-webpack-plugin-canary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-canary-20251208-a01fa58b",
|
|
4
4
|
"description": "Simplifies creation of Lynx template files to serve your webpack bundles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@microsoft/api-extractor": "7.52.15",
|
|
44
44
|
"@types/css-tree": "^2.3.11",
|
|
45
45
|
"@types/object.groupby": "^1.0.4",
|
|
46
|
+
"css-loader": "^7.1.2",
|
|
46
47
|
"webpack": "^5.102.0",
|
|
47
48
|
"@lynx-js/test-tools": "0.0.0",
|
|
48
49
|
"@lynx-js/vitest-setup": "0.0.0"
|