@lynx-js/template-webpack-plugin-canary 0.7.0 → 0.7.1-canary-20250531-f65eeebe

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,13 @@
1
1
  # @lynx-js/template-webpack-plugin
2
2
 
3
+ ## 0.7.1-canary-20250531035833-f65eeebe9336e100929da70ad087a62e9db2b4e4
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: Merge the absent configurations for `.web.bundle`. ([#884](https://github.com/lynx-family/lynx-stack/pull/884))
8
+
9
+ Before this change, the configuration of pageConfig in `.web.bundle` was `compilerOptions`. After this commit, pageConfig will be a combination of `compilerOptions` and `sourceContent.config`.
10
+
3
11
  ## 0.7.0
4
12
 
5
13
  ### Minor Changes
@@ -17,7 +25,7 @@
17
25
  example:
18
26
 
19
27
  ```js
20
- import { defineConfig } from '@lynx-js/rspeedy';
28
+ import { defineConfig } from "@lynx-js/rspeedy";
21
29
 
22
30
  export default defineConfig({
23
31
  output: {
@@ -112,7 +120,7 @@
112
120
  - Add `defaultOverflowVisible` option to `LynxTemplatePlugin`. ([#78](https://github.com/lynx-family/lynx-stack/pull/78))
113
121
 
114
122
  ```js
115
- import { LynxTemplatePlugin } from '@lynx-js/template-webpack-plugin';
123
+ import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
116
124
 
117
125
  new LynxTemplatePlugin({
118
126
  defaultOverflowVisible: false,
@@ -131,10 +139,10 @@
131
139
  - 1abf8f0: Add `entryNames` parameter to `beforeEncode` hook.
132
140
 
133
141
  ```js
134
- import { LynxTemplatePlugin } from '@lynx-js/template-webpack-plugin';
142
+ import { LynxTemplatePlugin } from "@lynx-js/template-webpack-plugin";
135
143
 
136
144
  const hooks = LynxTemplatePlugin.getLynxTemplatePluginHooks(compilation);
137
- hooks.beforeEncode.tap('MyPlugin', ({ entryNames }) => {
145
+ hooks.beforeEncode.tap("MyPlugin", ({ entryNames }) => {
138
146
  console.log(entryNames);
139
147
  });
140
148
  ```
@@ -410,11 +410,11 @@ class LynxTemplatePluginImpl {
410
410
  */
411
411
  #filterEntryChunks(chunks, includedChunks, excludedChunks) {
412
412
  return chunks.filter((chunkName) => {
413
- // Skip if the chunks should be filtered and the given chunk was not added explicity
413
+ // Skip if the chunks should be filtered and the given chunk was not added explicitly
414
414
  if (Array.isArray(includedChunks) && !includedChunks.includes(chunkName)) {
415
415
  return false;
416
416
  }
417
- // Skip if the chunks should be filtered and the given chunk was excluded explicity
417
+ // Skip if the chunks should be filtered and the given chunk was excluded explicitly
418
418
  if (excludedChunks.includes(chunkName)) {
419
419
  return false;
420
420
  }
@@ -52,7 +52,10 @@ export class WebEncodePlugin {
52
52
  },
53
53
  customSections: encodeData.customSections,
54
54
  cardType: encodeData.sourceContent.dsl.substring(0, 5),
55
- pageConfig: encodeData.compilerOptions,
55
+ pageConfig: {
56
+ ...encodeData.compilerOptions,
57
+ ...encodeData.sourceContent.config,
58
+ },
56
59
  });
57
60
  return encodeOptions;
58
61
  });
@@ -65,7 +68,7 @@ export class WebEncodePlugin {
65
68
  styleInfo: encodeOptions['styleInfo'],
66
69
  manifest: encodeOptions.manifest,
67
70
  cardType: encodeOptions['cardType'],
68
- pageConfig: encodeOptions.compilerOptions,
71
+ pageConfig: encodeOptions['pageConfig'],
69
72
  lepusCode: {
70
73
  // flatten the lepusCode to a single object
71
74
  ...encodeOptions.lepusCode.lepusChunk,
@@ -38,7 +38,7 @@ export function genStyleInfo(cssMap) {
38
38
  let plainSelectors = [];
39
39
  let pseudoClassSelectors = [];
40
40
  let pseudoElementSelectors = [];
41
- const currentSplittedSelectorInfo = [];
41
+ const currentSplitSelectorInfo = [];
42
42
  for (const selector of selectorList.children.toArray()) {
43
43
  if (selector.type === 'PseudoClassSelector'
44
44
  && selector.name === 'root') {
@@ -61,7 +61,7 @@ export function genStyleInfo(cssMap) {
61
61
  plainSelectors.push(`[lynx-tag="${selector.name}"]`);
62
62
  }
63
63
  else if (selector.type === 'Combinator') {
64
- currentSplittedSelectorInfo.push(plainSelectors, pseudoClassSelectors, pseudoElementSelectors, [CSS.csstree.generate(selector)]);
64
+ currentSplitSelectorInfo.push(plainSelectors, pseudoClassSelectors, pseudoElementSelectors, [CSS.csstree.generate(selector)]);
65
65
  plainSelectors = [];
66
66
  pseudoClassSelectors = [];
67
67
  pseudoElementSelectors = [];
@@ -70,8 +70,8 @@ export function genStyleInfo(cssMap) {
70
70
  plainSelectors.push(CSS.csstree.generate(selector));
71
71
  }
72
72
  }
73
- currentSplittedSelectorInfo.push(plainSelectors, pseudoClassSelectors, pseudoElementSelectors, []);
74
- groupedSelectors.push(currentSplittedSelectorInfo);
73
+ currentSplitSelectorInfo.push(plainSelectors, pseudoClassSelectors, pseudoElementSelectors, []);
74
+ groupedSelectors.push(currentSplitSelectorInfo);
75
75
  }
76
76
  const decl = node.style.map((declaration) => [
77
77
  declaration.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/template-webpack-plugin-canary",
3
- "version": "0.7.0",
3
+ "version": "0.7.1-canary-20250531-f65eeebe",
4
4
  "description": "Simplifies creation of Lynx template files to serve your webpack bundles",
5
5
  "keywords": [
6
6
  "webpack",