@lynx-js/template-webpack-plugin-canary 0.9.2-canary-20251201-738d44d6 → 0.9.2-canary-20251202-5bbb4398
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 +3 -1
- package/lib/LynxTemplatePlugin.d.ts +2 -0
- package/lib/LynxTemplatePlugin.js +8 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# @lynx-js/template-webpack-plugin
|
|
2
2
|
|
|
3
|
-
## 0.9.2-canary-
|
|
3
|
+
## 0.9.2-canary-20251202033103-5bbb43981580f917f59819cd4ff7972b9737a341
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- Set main thread JS basename to `lepusCode.filename` in tasm encode data. It will ensure a filename is reported on MTS error without devtools enabled. ([#1949](https://github.com/lynx-family/lynx-stack/pull/1949))
|
|
8
|
+
|
|
7
9
|
- Upgrade `@lynx-js/tasm` to `0.0.20`. ([#1943](https://github.com/lynx-family/lynx-stack/pull/1943))
|
|
8
10
|
|
|
9
11
|
## 0.9.1
|
|
@@ -17,6 +17,7 @@ export interface EncodeOptions {
|
|
|
17
17
|
lepusCode: {
|
|
18
18
|
root: string | undefined;
|
|
19
19
|
lepusChunk: Record<string, string>;
|
|
20
|
+
filename: string | undefined;
|
|
20
21
|
};
|
|
21
22
|
customSections: Record<string, {
|
|
22
23
|
type?: 'lazy';
|
|
@@ -239,6 +240,7 @@ interface EncodeRawData {
|
|
|
239
240
|
lepusCode: {
|
|
240
241
|
root: Asset | undefined;
|
|
241
242
|
chunks: Asset[];
|
|
243
|
+
filename: string | undefined;
|
|
242
244
|
};
|
|
243
245
|
/**
|
|
244
246
|
* background thread
|
|
@@ -310,6 +310,13 @@ class LynxTemplatePluginImpl {
|
|
|
310
310
|
// TODO: support multiple lepus chunks
|
|
311
311
|
root: assetsInfoByGroups.mainThread[0],
|
|
312
312
|
chunks: [],
|
|
313
|
+
filename: (() => {
|
|
314
|
+
const name = assetsInfoByGroups.mainThread[0]?.name;
|
|
315
|
+
if (name) {
|
|
316
|
+
return path.basename(name);
|
|
317
|
+
}
|
|
318
|
+
return undefined;
|
|
319
|
+
})(),
|
|
313
320
|
},
|
|
314
321
|
manifest: Object.fromEntries(assetsInfoByGroups.backgroundThread.map(asset => {
|
|
315
322
|
return [asset.name, asset.source.source().toString()];
|
|
@@ -336,6 +343,7 @@ class LynxTemplatePluginImpl {
|
|
|
336
343
|
lepusChunk: Object.fromEntries(lepusCode.chunks.map(asset => {
|
|
337
344
|
return [asset.name, asset.source.source().toString()];
|
|
338
345
|
})),
|
|
346
|
+
filename: lepusCode.filename,
|
|
339
347
|
},
|
|
340
348
|
};
|
|
341
349
|
const debugInfoPath = path.posix.format({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/template-webpack-plugin-canary",
|
|
3
|
-
"version": "0.9.2-canary-
|
|
3
|
+
"version": "0.9.2-canary-20251202-5bbb4398",
|
|
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.11",
|
|
45
45
|
"@types/object.groupby": "^1.0.4",
|
|
46
46
|
"webpack": "^5.102.0",
|
|
47
|
-
"@lynx-js/
|
|
48
|
-
"@lynx-js/
|
|
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"
|