@marko/vite 4.1.2 → 4.1.4
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/index.mjs +12 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -527,10 +527,12 @@ function plugin(options) {
|
|
|
527
527
|
|
|
528
528
|
// src/render-assets-transform.ts
|
|
529
529
|
var render_assets_transform_default = (tag, t2) => {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
530
|
+
if (tag.hub.file.markoOpts.markoViteLinked) {
|
|
531
|
+
const body = tag.get("body");
|
|
532
|
+
const tagName = tag.get("name").node.value;
|
|
533
|
+
body.unshiftContainer("body", renderAssetsCall(t2, `${tagName}-prepend`));
|
|
534
|
+
body.pushContainer("body", renderAssetsCall(t2, tagName));
|
|
535
|
+
}
|
|
534
536
|
};
|
|
535
537
|
function renderAssetsCall(t2, slot) {
|
|
536
538
|
return t2.markoPlaceholder(
|
|
@@ -747,6 +749,9 @@ function markoPlugin(opts = {}) {
|
|
|
747
749
|
resolveVirtualDependency,
|
|
748
750
|
output: "html"
|
|
749
751
|
};
|
|
752
|
+
if (linked) {
|
|
753
|
+
ssrConfig.markoViteLinked = linked;
|
|
754
|
+
}
|
|
750
755
|
ssrCjsServeConfig = {
|
|
751
756
|
...ssrConfig,
|
|
752
757
|
ast: true,
|
|
@@ -783,9 +788,9 @@ function markoPlugin(opts = {}) {
|
|
|
783
788
|
config.resolve.conditions ??= [];
|
|
784
789
|
config.resolve.conditions.push("browser");
|
|
785
790
|
test.deps ??= {};
|
|
786
|
-
test.optimizer ??= {};
|
|
787
|
-
test.optimizer.web ??= {};
|
|
788
|
-
test.optimizer.web.enabled ??= true;
|
|
791
|
+
test.deps.optimizer ??= {};
|
|
792
|
+
test.deps.optimizer.web ??= {};
|
|
793
|
+
test.deps.optimizer.web.enabled ??= true;
|
|
789
794
|
}
|
|
790
795
|
}
|
|
791
796
|
if (!registeredTagLib) {
|