@vitejs/plugin-vue
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"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
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 website
QualityPackage does not have a website.
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
170269
6
4977
0
59
1