@lynx-js/template-webpack-plugin-canary 0.8.1 → 0.8.2-canary-20250716-cb7feb6e

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,11 @@
1
1
  # @lynx-js/template-webpack-plugin
2
2
 
3
+ ## 0.8.2-canary-20250716073530-cb7feb6e8cc9f4b83ac3147bd3e5a82059caa06a
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix the `Syntax Error: expecting ';'` error of chunk splitting ([#1279](https://github.com/lynx-family/lynx-stack/pull/1279))
8
+
3
9
  ## 0.8.1
4
10
 
5
11
  ### Patch Changes
@@ -33,16 +39,16 @@
33
39
  type InlineChunkConfig =
34
40
  | boolean
35
41
  | InlineChunkTest
36
- | { enable?: boolean | 'auto'; test: InlineChunkTest };
42
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
37
43
  ```
38
44
 
39
45
  ```ts
40
- import { defineConfig } from '@lynx-js/rspeedy';
46
+ import { defineConfig } from "@lynx-js/rspeedy";
41
47
 
42
48
  export default defineConfig({
43
49
  output: {
44
50
  inlineScripts: ({ name, size }) => {
45
- return name.includes('foo') && size < 1000;
51
+ return name.includes("foo") && size < 1000;
46
52
  },
47
53
  },
48
54
  });
@@ -92,7 +98,7 @@
92
98
  example:
93
99
 
94
100
  ```js
95
- import { defineConfig } from '@lynx-js/rspeedy';
101
+ import { defineConfig } from "@lynx-js/rspeedy";
96
102
 
97
103
  export default defineConfig({
98
104
  output: {
@@ -187,7 +193,7 @@
187
193
  - Add `defaultOverflowVisible` option to `LynxTemplatePlugin`. ([#78](https://github.com/lynx-family/lynx-stack/pull/78))
188
194
 
189
195
  ```js
190
- import { LynxTemplatePlugin } from '@lynx-js/template-webpack-plugin';
196
+ import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
191
197
 
192
198
  new LynxTemplatePlugin({
193
199
  defaultOverflowVisible: false,
@@ -206,10 +212,10 @@
206
212
  - 1abf8f0: Add `entryNames` parameter to `beforeEncode` hook.
207
213
 
208
214
  ```js
209
- import { LynxTemplatePlugin } from '@lynx-js/template-webpack-plugin';
215
+ import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
210
216
 
211
217
  const hooks = LynxTemplatePlugin.getLynxTemplatePluginHooks(compilation);
212
- hooks.beforeEncode.tap('MyPlugin', ({ entryNames }) => {
218
+ hooks.beforeEncode.tap("MyPlugin", ({ entryNames }) => {
213
219
  console.log(entryNames);
214
220
  });
215
221
  ```
@@ -134,14 +134,10 @@ export class LynxEncodePluginImpl {
134
134
  // ```
135
135
  '/app-service.js': [
136
136
  this.#appServiceBanner(),
137
- ...[externalManifest, inlinedManifest].flatMap(manifest => Object.keys(manifest).map(name => {
138
- if (manifest === externalManifest) {
139
- return `lynx.requireModuleAsync('${this.#formatJSName(name, publicPath)}')`;
140
- }
141
- else {
142
- return `module.exports=lynx.requireModule('${this.#formatJSName(name, '/')}',globDynamicComponentEntry?globDynamicComponentEntry:'__Card__')`;
143
- }
144
- }).join(',')),
137
+ Object.keys(externalManifest).map(name => `lynx.requireModuleAsync('${this.#formatJSName(name, publicPath)}')`).join(','),
138
+ ';module.exports=',
139
+ Object.keys(inlinedManifest).map(name => `lynx.requireModule('${this.#formatJSName(name, '/')}',globDynamicComponentEntry?globDynamicComponentEntry:'__Card__')`).join(','),
140
+ ';',
145
141
  this.#appServiceFooter(),
146
142
  ].join(''),
147
143
  ...Object.fromEntries(Object.entries(inlinedManifest).map(([name, content]) => [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/template-webpack-plugin-canary",
3
- "version": "0.8.1",
3
+ "version": "0.8.2-canary-20250716-cb7feb6e",
4
4
  "description": "Simplifies creation of Lynx template files to serve your webpack bundles",
5
5
  "keywords": [
6
6
  "webpack",
@@ -44,8 +44,8 @@
44
44
  "@types/css-tree": "^2.3.10",
45
45
  "@types/object.groupby": "^1.0.4",
46
46
  "webpack": "^5.99.9",
47
- "@lynx-js/vitest-setup": "0.0.0",
48
- "@lynx-js/test-tools": "0.0.0"
47
+ "@lynx-js/test-tools": "0.0.0",
48
+ "@lynx-js/vitest-setup": "0.0.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=18"