marko 5.39.18 → 5.39.20
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/dist/runtime/html/StringWriter.js +1 -1
- package/dist/translator/taglib/core/index.js +0 -1
- package/dist/translator/util/load-import.js +5 -10
- package/package.json +2 -2
- package/src/runtime/html/StringWriter.js +1 -1
- package/src/translator/taglib/core/index.js +0 -1
- package/src/translator/util/load-import.js +5 -10
- package/dist/translator/taglib/core/transform-body.js +0 -15
- package/src/translator/taglib/core/transform-body.js +0 -15
|
@@ -11,7 +11,6 @@ var parseImport = _interopRequireWildcard(require("./parse-import"));
|
|
|
11
11
|
var parseModuleCode = _interopRequireWildcard(require("./parse-module-code"));
|
|
12
12
|
var parseServer = _interopRequireWildcard(require("./parse-server"));
|
|
13
13
|
var parseStatic = _interopRequireWildcard(require("./parse-static"));
|
|
14
|
-
var transformBody = _interopRequireWildcard(require("./transform-body"));
|
|
15
14
|
var transformStyle = _interopRequireWildcard(require("./transform-style"));
|
|
16
15
|
var translateAwait = _interopRequireWildcard(require("./translate-await"));
|
|
17
16
|
var translateFor = _interopRequireWildcard(require("./translate-for"));
|
|
@@ -24,9 +24,11 @@ function analyzeLoadImport(importDecl, tagEntry) {
|
|
|
24
24
|
|
|
25
25
|
// Under hot reload every module is already eagerly loaded, so the lazy facade
|
|
26
26
|
// buys nothing and its HMR-cached template collides with the real template's
|
|
27
|
-
// `_` slot, recursing on render (see load-tag-browser.js).
|
|
28
|
-
//
|
|
29
|
-
|
|
27
|
+
// `_` slot, recursing on render (see load-tag-browser.js). Without `linkAssets`
|
|
28
|
+
// there is no asset orchestration for lazy loading either. Both cases drop the
|
|
29
|
+
// attribute so the import compiles as a normal eager tag import.
|
|
30
|
+
const { markoOpts } = importDecl.hub.file;
|
|
31
|
+
if (markoOpts.hot || !markoOpts.linkAssets) {
|
|
30
32
|
loadAttrPath.remove();
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
@@ -51,13 +53,6 @@ function analyzeLoadImport(importDecl, tagEntry) {
|
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
const { markoOpts } = importDecl.hub.file;
|
|
55
|
-
if (!markoOpts.linkAssets) {
|
|
56
|
-
throw importDecl.buildCodeFrameError(
|
|
57
|
-
"The `load` import attribute requires the `linkAssets` compiler option to be configured."
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
56
|
(importDecl.node.extra ??= {}).loadImport =
|
|
62
57
|
getLoadImportConfig(loadAttrValuePath);
|
|
63
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "5.39.
|
|
3
|
+
"version": "5.39.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@marko/compiler": "^5.41.0",
|
|
74
|
-
"@marko/runtime-tags": "^6.3.
|
|
74
|
+
"@marko/runtime-tags": "^6.3.11",
|
|
75
75
|
"app-module-path": "^2.2.0",
|
|
76
76
|
"argly": "^1.2.0",
|
|
77
77
|
"browser-refresh-client": "1.1.4",
|
|
@@ -11,7 +11,6 @@ import * as parseImport from "./parse-import";
|
|
|
11
11
|
import * as parseModuleCode from "./parse-module-code";
|
|
12
12
|
import * as parseServer from "./parse-server";
|
|
13
13
|
import * as parseStatic from "./parse-static";
|
|
14
|
-
import * as transformBody from "./transform-body";
|
|
15
14
|
import * as transformStyle from "./transform-style";
|
|
16
15
|
import * as translateAwait from "./translate-await";
|
|
17
16
|
import * as translateFor from "./translate-for";
|
|
@@ -24,9 +24,11 @@ export function analyzeLoadImport(importDecl, tagEntry) {
|
|
|
24
24
|
|
|
25
25
|
// Under hot reload every module is already eagerly loaded, so the lazy facade
|
|
26
26
|
// buys nothing and its HMR-cached template collides with the real template's
|
|
27
|
-
// `_` slot, recursing on render (see load-tag-browser.js).
|
|
28
|
-
//
|
|
29
|
-
|
|
27
|
+
// `_` slot, recursing on render (see load-tag-browser.js). Without `linkAssets`
|
|
28
|
+
// there is no asset orchestration for lazy loading either. Both cases drop the
|
|
29
|
+
// attribute so the import compiles as a normal eager tag import.
|
|
30
|
+
const { markoOpts } = importDecl.hub.file;
|
|
31
|
+
if (markoOpts.hot || !markoOpts.linkAssets) {
|
|
30
32
|
loadAttrPath.remove();
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
@@ -51,13 +53,6 @@ export function analyzeLoadImport(importDecl, tagEntry) {
|
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
const { markoOpts } = importDecl.hub.file;
|
|
55
|
-
if (!markoOpts.linkAssets) {
|
|
56
|
-
throw importDecl.buildCodeFrameError(
|
|
57
|
-
"The `load` import attribute requires the `linkAssets` compiler option to be configured.",
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
56
|
(importDecl.node.extra ??= {}).loadImport =
|
|
62
57
|
getLoadImportConfig(loadAttrValuePath);
|
|
63
58
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";exports.__esModule = true;exports.default = _default;var _compiler = require("@marko/compiler");
|
|
2
|
-
|
|
3
|
-
function _default(path) {
|
|
4
|
-
path.
|
|
5
|
-
get("body").
|
|
6
|
-
pushContainer("body", [
|
|
7
|
-
_compiler.types.markoTag(_compiler.types.stringLiteral("init-components"), [], _compiler.types.markoTagBody()),
|
|
8
|
-
_compiler.types.markoTag(_compiler.types.stringLiteral("await-reorderer"), [], _compiler.types.markoTagBody()),
|
|
9
|
-
_compiler.types.markoTag(
|
|
10
|
-
_compiler.types.stringLiteral("_preferred-script-location"),
|
|
11
|
-
[],
|
|
12
|
-
_compiler.types.markoTagBody()
|
|
13
|
-
)]
|
|
14
|
-
);
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { types as t } from "@marko/compiler";
|
|
2
|
-
|
|
3
|
-
export default function (path) {
|
|
4
|
-
path
|
|
5
|
-
.get("body")
|
|
6
|
-
.pushContainer("body", [
|
|
7
|
-
t.markoTag(t.stringLiteral("init-components"), [], t.markoTagBody()),
|
|
8
|
-
t.markoTag(t.stringLiteral("await-reorderer"), [], t.markoTagBody()),
|
|
9
|
-
t.markoTag(
|
|
10
|
-
t.stringLiteral("_preferred-script-location"),
|
|
11
|
-
[],
|
|
12
|
-
t.markoTagBody(),
|
|
13
|
-
),
|
|
14
|
-
]);
|
|
15
|
-
}
|