@lynx-js/template-webpack-plugin-canary 0.6.6 → 0.6.7-canary-20250327-42217c2c

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.6.7-canary-20250327165511-42217c2c77a33e729977fc7108b218a1cb868e6a
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: merge different chunk groups for same output filename ([#371](https://github.com/lynx-family/lynx-stack/pull/371))
8
+
3
9
  ## 0.6.6
4
10
 
5
11
  ### Patch Changes
@@ -23,7 +29,7 @@
23
29
  - Add `defaultOverflowVisible` option to `LynxTemplatePlugin`. ([#78](https://github.com/lynx-family/lynx-stack/pull/78))
24
30
 
25
31
  ```js
26
- import { LynxTemplatePlugin } from '@lynx-js/template-webpack-plugin';
32
+ import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
27
33
 
28
34
  new LynxTemplatePlugin({
29
35
  defaultOverflowVisible: false,
@@ -42,10 +48,10 @@
42
48
  - 1abf8f0: Add `entryNames` parameter to `beforeEncode` hook.
43
49
 
44
50
  ```js
45
- import { LynxTemplatePlugin } from '@lynx-js/template-webpack-plugin';
51
+ import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
46
52
 
47
53
  const hooks = LynxTemplatePlugin.getLynxTemplatePluginHooks(compilation);
48
- hooks.beforeEncode.tap('MyPlugin', ({ entryNames }) => {
54
+ hooks.beforeEncode.tap("MyPlugin", ({ entryNames }) => {
49
55
  console.log(entryNames);
50
56
  });
51
57
  ```
@@ -224,11 +224,9 @@ class LynxTemplatePluginImpl {
224
224
  if (asyncChunkGroups) {
225
225
  return asyncChunkGroups;
226
226
  }
227
+ const hooks = LynxTemplatePlugin.getLynxTemplatePluginHooks(compilation);
227
228
  asyncChunkGroups = groupBy(compilation.chunkGroups
228
- .filter(cg => !cg.isInitial()), (cg) => cg.origins
229
- .sort((a, b) => a.request.localeCompare(b.request))
230
- .map(({ request }) => request)
231
- .join('|'));
229
+ .filter(cg => !cg.isInitial()), cg => hooks.asyncChunkName.call(cg.name));
232
230
  _a.#asyncChunkGroups.set(compilation, asyncChunkGroups);
233
231
  return asyncChunkGroups;
234
232
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/template-webpack-plugin-canary",
3
- "version": "0.6.6",
3
+ "version": "0.6.7-canary-20250327-42217c2c",
4
4
  "description": "Simplifies creation of Lynx template files to serve your webpack bundles",
5
5
  "keywords": [
6
6
  "webpack",