Socket
Socket
Sign inDemoInstall

@astrojs/vue

Package Overview
Dependencies
Maintainers
3
Versions
89
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 2.2.1 to 3.0.0-beta.0

9

dist/index.js

@@ -35,3 +35,3 @@ import vue from "@vitejs/plugin-vue";

if (id === resolvedVirtualModuleId) {
if (options == null ? void 0 : options.appEntrypoint) {
if (options?.appEntrypoint) {
return `export { default as setup } from "${options.appEntrypoint}";`;

@@ -45,3 +45,2 @@ }

async function getViteConfiguration(options) {
var _a;
const config = {

@@ -58,6 +57,6 @@ optimizeDeps: {

};
if (options == null ? void 0 : options.jsx) {
if (options?.jsx) {
const vueJsx = (await import("@vitejs/plugin-vue-jsx")).default;
const jsxOptions = typeof options.jsx === "object" ? options.jsx : void 0;
(_a = config.plugins) == null ? void 0 : _a.push(vueJsx(jsxOptions));
config.plugins?.push(vueJsx(jsxOptions));
}

@@ -72,3 +71,3 @@ return config;

addRenderer(getRenderer());
if (options == null ? void 0 : options.jsx) {
if (options?.jsx) {
addRenderer(getJsxRenderer());

@@ -75,0 +74,0 @@ }

{
"name": "@astrojs/vue",
"version": "2.2.1",
"version": "3.0.0-beta.0",
"description": "Use Vue components within Astro",

@@ -37,23 +37,23 @@ "type": "module",

"dependencies": {
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/babel-plugin-jsx": "^1.1.1",
"@vue/compiler-sfc": "^3.2.39"
"@vue/compiler-sfc": "^3.3.4"
},
"devDependencies": {
"@types/chai": "^4.3.3",
"chai": "^4.3.6",
"linkedom": "^0.14.17",
"@types/chai": "^4.3.5",
"chai": "^4.3.7",
"linkedom": "^0.14.26",
"mocha": "^9.2.2",
"vite": "^4.3.1",
"vue": "^3.2.37",
"astro": "2.5.6",
"vite": "^4.4.6",
"vue": "^3.3.4",
"astro": "3.0.0-beta.0",
"astro-scripts": "0.0.14"
},
"peerDependencies": {
"astro": "^2.5.6",
"astro": "^3.0.0-beta.0",
"vue": "^3.2.30"
},
"engines": {
"node": ">=16.12.0"
"node": ">=18.14.1"
},

@@ -60,0 +60,0 @@ "scripts": {

@@ -12,2 +12,3 @@ # @astrojs/vue 💚

Astro includes a CLI tool for adding first party integrations: `astro add`. This command will:
1. (Optionally) Install all necessary dependencies and peer dependencies

@@ -45,5 +46,4 @@ 2. (Also optionally) Update your `astro.config.*` file to apply this integration

__`astro.config.mjs`__
```js ins={2} "vue()"
```js ins={3} "vue()"
// astro.config.mjs
import { defineConfig } from 'astro/config';

@@ -61,2 +61,3 @@ import vue from '@astrojs/vue';

To use your first Vue component in Astro, head to our [UI framework documentation][astro-ui-frameworks]. You'll explore:
- 📦 how framework components are loaded,

@@ -83,5 +84,4 @@ - 💧 client-side hydration options, and

__`astro.config.mjs`__
```js
// astro.config.mjs
import { defineConfig } from 'astro/config';

@@ -92,11 +92,13 @@ import vue from '@astrojs/vue';

// ...
integrations: [vue({
template: {
compilerOptions: {
// treat any tag that starts with ion- as custom elements
isCustomElement: tag => tag.startsWith('ion-')
}
}
// ...
})],
integrations: [
vue({
template: {
compilerOptions: {
// treat any tag that starts with ion- as custom elements
isCustomElement: (tag) => tag.startsWith('ion-'),
},
},
// ...
}),
],
});

@@ -111,5 +113,4 @@ ```

__`astro.config.mjs`__
```js
// astro.config.mjs
import { defineConfig } from 'astro/config';

@@ -119,11 +120,8 @@ import vue from '@astrojs/vue';

export default defineConfig({
integrations: [
vue({ appEntrypoint: '/src/pages/_app' })
],
integrations: [vue({ appEntrypoint: '/src/pages/_app' })],
});
```
__`src/pages/_app.ts`__
```js
// src/pages/_app.ts
import type { App } from 'vue';

@@ -134,3 +132,3 @@ import i18nPlugin from 'my-vue-i18n-plugin';

app.use(i18nPlugin);
}
};
```

@@ -142,5 +140,4 @@

__`astro.config.mjs`__
```js
// astro.config.mjs
import { defineConfig } from 'astro/config';

@@ -150,5 +147,3 @@ import vue from '@astrojs/vue';

export default defineConfig({
integrations: [
vue({ jsx: true })
],
integrations: [vue({ jsx: true })],
});

@@ -159,5 +154,4 @@ ```

__`astro.config.mjs`__
```js
// astro.config.mjs
import { defineConfig } from 'astro/config';

@@ -171,7 +165,7 @@ import vue from '@astrojs/vue';

// treat any tag that starts with ion- as custom elements
isCustomElement: tag => tag.startsWith('ion-')
}
})
isCustomElement: (tag) => tag.startsWith('ion-'),
},
}),
],
});
```
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