Socket
Socket
Sign inDemoInstall

@vitejs/plugin-vue

Package Overview
Dependencies
Maintainers
3
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.2.5 to 1.3.0

14

CHANGELOG.md

@@ -0,1 +1,15 @@

# [1.3.0](https://github.com/vitejs/vite/compare/plugin-vue@1.2.5...plugin-vue@1.3.0) (2021-07-27)
### Bug Fixes
* reuse the old preprocessor after changing the lang attr ([#4224](https://github.com/vitejs/vite/issues/4224)) ([7a3c6e6](https://github.com/vitejs/vite/commit/7a3c6e616385cbc069620ae583d6739a972c0ead))
### Features
* **plugin-vue:** support importing vue files as custom elements ([3a3af6e](https://github.com/vitejs/vite/commit/3a3af6eeafbc9fc686fc909ec6a61c61283316fc))
## [1.2.5](https://github.com/vitejs/vite/compare/plugin-vue@1.2.4...plugin-vue@1.2.5) (2021-07-12)

@@ -2,0 +16,0 @@

@@ -15,2 +15,11 @@ import { Plugin as Plugin_2 } from 'vite';

/**
* Transform Vue SFCs into custom elements.
* **requires Vue \>= 3.2.0 & Vite \>= 2.4.4**
* - `true`: all `*.vue` imports are converted into custom elements
* - `string | RegExp`: matched files are converted into custom elements
*
* @default /\.ce\.vue$/
*/
customElement?: boolean | string | RegExp | (string | RegExp)[];
/**
* @deprecated the plugin now auto-detects whether it's being invoked for ssr.

@@ -17,0 +26,0 @@ */

4

package.json
{
"name": "@vitejs/plugin-vue",
"version": "1.2.5",
"version": "1.3.0",
"license": "MIT",

@@ -35,3 +35,3 @@ "author": "Evan You",

"devDependencies": {
"@rollup/pluginutils": "^4.1.0",
"@rollup/pluginutils": "^4.1.1",
"@types/hash-sum": "^1.0.0",

@@ -38,0 +38,0 @@ "@vue/compiler-sfc": "^3.0.8",

@@ -24,2 +24,11 @@ # @vitejs/plugin-vue [![npm](https://img.shields.io/npm/v/@vitejs/plugin-vue.svg)](https://npmjs.com/package/@vitejs/plugin-vue)

/**
* Transform Vue SFCs into custom elements (requires Vue >= 3.2.0)
* - `true` -> all `*.vue` imports are converted into custom elements
* - `string | RegExp` -> matched files are converted into custom elements
*
* @default /\.ce\.vue$/
*/
customElement?: boolean | string | RegExp | (string | RegExp)[]
// options to pass on to @vue/compiler-sfc

@@ -75,4 +84,25 @@ script?: Partial<SFCScriptCompileOptions>

## Using Vue SFCs as Custom Elements
> Requires `vue@^3.2.0`
By default, files ending in `*.ce.vue` will be processed as native Custom Elements when imported (created with `defineCustomElement` from Vue core):
```js
import Example from './Example.ce.vue'
// register
customElements.define('my-example', Example)
// can also be instantiated
const myExample = new Example()
```
The `customElement` plugin option can be used to configure the behavior:
- `{ customElement: true }` will import all `*.vue` files as Custom Elements.
- Use a string or regex pattern to change how files should be loaded as Custom Elements (this check is applied after `include` and `exclude` matches).
## 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