Socket
Socket
Sign inDemoInstall

@vitejs/plugin-vue

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitejs/plugin-vue - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

CHANGELOG.md

8

package.json
{
"name": "@vitejs/plugin-vue",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"author": "Evan You",
"files": [

@@ -15,3 +16,4 @@ "dist"

"build-types": "tsc -p . --emitDeclarationOnly --outDir temp && api-extractor run && rimraf temp",
"prepublishOnly": "yarn build"
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package plugin-vue",
"release": "node ../../scripts/release.js"
},

@@ -28,3 +30,3 @@ "engines": {

},
"homepage": "https://github.com/vitejs/vite/tree/master/#readme",
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue#readme",
"peerDependencies": {

@@ -31,0 +33,0 @@ "@vue/compiler-sfc": "^3.0.4"

@@ -14,4 +14,47 @@ # @vitejs/plugin-vue

## Options
```ts
export interface Options {
include?: string | RegExp | (string | RegExp)[]
exclude?: string | RegExp | (string | RegExp)[]
ssr?: boolean
isProduction?: boolean
// options to pass on to @vue/compiler-sfc
script?: SFCScriptCompileOptions
template?: SFCTemplateCompileOptions
style?: SFCStyleCompileOptions
}
```
## Example for transforming custom blocks
```ts
// vite.config.js
import vue from '@vitejs/plugin-vue'
const vueI18nPlugin = {
name: 'vue-i18n',
transform(code, id) {
if (!/vue&type=i18n/.test(id)) {
return
}
if (/\.ya?ml$/.test(id)) {
code = JSON.stringify(require('js-yaml').safeLoad(code.trim()))
}
return `export default Comp => {
Comp.i18n = ${code}
}`
}
}
export default {
plugins: [vue(), vueI18nPlugin]
}
```
## License
MIT

Sorry, the diff of this file is too big to display

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