@marko/vite 4.1.3 → 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.
Files changed (2) hide show
  1. package/dist/index.mjs +9 -4
  2. 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
- const body = tag.get("body");
531
- const tagName = tag.get("name").node.value;
532
- body.unshiftContainer("body", renderAssetsCall(t2, `${tagName}-prepend`));
533
- body.pushContainer("body", renderAssetsCall(t2, tagName));
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,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
3
  "description": "A Marko plugin for Vite",
4
- "version": "4.1.3",
4
+ "version": "4.1.4",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {