Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/vue

Package Overview
Dependencies
Maintainers
3
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/vue - npm Package Compare versions

Comparing version 4.0.7 to 4.0.8

1

client.js

@@ -7,3 +7,2 @@ import { h, createSSRApp, createApp, Suspense } from 'vue';

async (Component, props, slotted, { client }) => {
delete props['class'];
if (!element.hasAttribute('ssr')) return;

@@ -10,0 +9,0 @@

24

dist/index.js
import path from "node:path";
import vue from "@vitejs/plugin-vue";
import { MagicString } from "@vue/compiler-sfc";
function getRenderer() {

@@ -29,2 +30,3 @@ return {

let root;
let appEntrypoint;
return {

@@ -37,2 +39,5 @@ name: "@astrojs/vue/virtual-app",

root = config.root;
if (options?.appEntrypoint) {
appEntrypoint = options.appEntrypoint.startsWith(".") ? path.resolve(root, options.appEntrypoint) : options.appEntrypoint;
}
},

@@ -46,4 +51,3 @@ resolveId(id) {

if (id === resolvedVirtualModuleId) {
if (options?.appEntrypoint) {
const appEntrypoint = options.appEntrypoint.startsWith(".") ? path.resolve(root, options.appEntrypoint) : options.appEntrypoint;
if (appEntrypoint) {
return `import * as mod from ${JSON.stringify(appEntrypoint)};

@@ -63,2 +67,18 @@

}
},
// Ensure that Vue components reference appEntrypoint directly
// This allows Astro to assosciate global styles imported in this file
// with the pages they should be injected to
transform(code, id) {
if (!appEntrypoint)
return;
if (id.endsWith(".vue")) {
const s = new MagicString(code);
s.prepend(`import ${JSON.stringify(appEntrypoint)};
`);
return {
code: s.toString(),
map: s.generateMap({ hires: "boundary" })
};
}
}

@@ -65,0 +85,0 @@ };

{
"name": "@astrojs/vue",
"version": "4.0.7",
"version": "4.0.8",
"description": "Use Vue components within Astro",

@@ -50,3 +50,3 @@ "type": "module",

"vue": "^3.3.8",
"astro": "4.0.9",
"astro": "4.1.1",
"astro-scripts": "0.0.14"

@@ -53,0 +53,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc