@astrojs/vue
Advanced tools
Comparing version 2.2.1 to 3.0.0-beta.0
@@ -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-'), | ||
}, | ||
}), | ||
], | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18034
243
1
160
+ Added@astrojs/compiler@2.10.3(transitive)
+ Added@astrojs/internal-helpers@0.2.1(transitive)
+ Added@astrojs/markdown-remark@3.5.0(transitive)
+ Added@astrojs/prism@3.1.0(transitive)
+ Added@astrojs/telemetry@3.0.4(transitive)
+ Added@types/hast@3.0.4(transitive)
+ Added@types/mdast@4.0.4(transitive)
+ Added@ungap/structured-clone@1.2.0(transitive)
+ Addedastro@3.6.5(transitive)
+ Addedb4a@1.6.6(transitive)
+ Addedbare-events@2.4.2(transitive)
+ Addedbare-fs@2.3.4(transitive)
+ Addedbare-os@2.4.3(transitive)
+ Addedbare-path@2.1.3(transitive)
+ Addedbare-stream@2.3.0(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedboxen@7.1.1(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedcamelcase@7.0.1(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedclsx@2.1.1(transitive)
+ Addedcolor@4.2.3(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addeddebug@2.6.93.2.7(transitive)
+ Addeddecompress-response@6.0.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddetect-libc@2.0.3(transitive)
+ Addeddeterministic-object-hash@1.3.1(transitive)
+ Addeddevlop@1.1.0(transitive)
+ Addedemoji-regex@10.4.0(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedestree-walker@3.0.3(transitive)
+ Addedeventemitter3@5.0.1(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfast-fifo@1.3.2(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedhast-util-to-html@9.0.2(transitive)
+ Addedhast-util-whitespace@3.0.0(transitive)
+ Addedhtml-void-elements@3.0.0(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedimport-meta-resolve@3.1.1(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedis-inside-container@1.0.0(transitive)
+ Addedis-wsl@3.1.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedmdast-util-definitions@6.0.0(transitive)
+ Addedmdast-util-to-hast@13.2.0(transitive)
+ Addedmicromark-util-character@2.1.0(transitive)
+ Addedmicromark-util-encode@2.0.0(transitive)
+ Addedmicromark-util-sanitize-uri@2.0.0(transitive)
+ Addedmicromark-util-symbol@2.0.0(transitive)
+ Addedmicromark-util-types@2.0.0(transitive)
+ Addedmimic-response@3.1.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addedms@2.0.0(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addedneedle@2.9.1(transitive)
+ Addednode-abi@3.67.0(transitive)
+ Addednode-addon-api@6.1.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedora@7.0.1(transitive)
+ Addedp-queue@7.4.1(transitive)
+ Addedp-timeout@5.1.0(transitive)
+ Addedprebuild-install@7.1.2(transitive)
+ Addedprobe-image-size@7.2.3(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedqueue-tick@1.0.1(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedsharp@0.32.6(transitive)
+ Addedshikiji@0.6.13(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@4.0.1(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedstream-parser@0.3.1(transitive)
+ Addedstreamx@2.20.0(transitive)
+ Addedstring-width@6.1.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtar-fs@2.1.13.0.6(transitive)
+ Addedtar-stream@2.2.03.1.7(transitive)
+ Addedtext-decoder@1.1.1(transitive)
+ Addedtsconfck@3.1.3(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedunist-util-position@5.0.0(transitive)
+ Addedunist-util-stringify-position@4.0.0(transitive)
+ Addedvfile@6.0.3(transitive)
+ Addedvfile-message@4.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removed@astrojs/compiler@1.8.2(transitive)
- Removed@astrojs/internal-helpers@0.1.2(transitive)
- Removed@astrojs/language-server@1.0.8(transitive)
- Removed@astrojs/markdown-remark@2.2.1(transitive)
- Removed@astrojs/prism@2.1.2(transitive)
- Removed@astrojs/telemetry@2.1.1(transitive)
- Removed@astrojs/webapi@2.2.0(transitive)
- Removed@emmetio/abbreviation@2.3.3(transitive)
- Removed@emmetio/css-abbreviation@2.1.8(transitive)
- Removed@emmetio/scanner@1.0.4(transitive)
- Removed@fastify/busboy@2.1.1(transitive)
- Removed@pkgr/core@0.1.1(transitive)
- Removed@types/dom-view-transitions@1.0.5(transitive)
- Removed@types/json5@0.0.30(transitive)
- Removed@types/resolve@1.20.6(transitive)
- Removed@types/yargs-parser@21.0.3(transitive)
- Removed@vscode/emmet-helper@2.9.3(transitive)
- Removed@vscode/l10n@0.0.18(transitive)
- Removedansi-sequence-parser@1.1.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedastro@2.10.15(transitive)
- Removedboxen@6.2.1(transitive)
- Removedcamelcase@6.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedclone@1.0.4(transitive)
- Removeddefaults@1.0.4(transitive)
- Removedemmet@2.4.7(transitive)
- Removedestree-walker@3.0.0(transitive)
- Removedevents@3.3.0(transitive)
- Removedexeca@6.1.0(transitive)
- Removedget-stream@6.0.1(transitive)
- Removedgithub-slugger@1.5.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhuman-signals@3.0.1(transitive)
- Removedimport-meta-resolve@2.2.2(transitive)
- Removedis-docker@2.2.1(transitive)
- Removedis-wsl@2.2.0(transitive)
- Removedjsonc-parser@2.3.13.3.1(transitive)
- Removednetwork-information-types@0.1.1(transitive)
- Removedora@6.3.1(transitive)
- Removedprettier@2.8.8(transitive)
- Removedprettier-plugin-astro@0.9.1(transitive)
- Removeds.color@0.0.15(transitive)
- Removedsass-formatter@0.7.9(transitive)
- Removedshiki@0.14.7(transitive)
- Removedstrip-bom@4.0.0(transitive)
- Removedsuf-log@2.5.3(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedsynckit@0.8.8(transitive)
- Removedtsconfig-resolver@3.0.1(transitive)
- Removedtslib@2.7.0(transitive)
- Removedtype-fest@0.13.1(transitive)
- Removedtypescript@5.6.2(transitive)
- Removedundici@5.28.4(transitive)
- Removedvscode-css-languageservice@6.3.1(transitive)
- Removedvscode-html-languageservice@5.3.1(transitive)
- Removedvscode-jsonrpc@8.1.08.2.0(transitive)
- Removedvscode-languageserver@8.1.0(transitive)
- Removedvscode-languageserver-protocol@3.17.33.17.5(transitive)
- Removedvscode-languageserver-textdocument@1.0.12(transitive)
- Removedvscode-languageserver-types@3.17.33.17.5(transitive)
- Removedvscode-oniguruma@1.7.0(transitive)
- Removedvscode-textmate@8.0.0(transitive)
- Removedvscode-uri@2.1.23.0.8(transitive)
- Removedwcwidth@1.0.1(transitive)
Updated@vitejs/plugin-vue@^4.2.3
Updated@vue/compiler-sfc@^3.3.4