vite-plugin-externals
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "vite-plugin-externals", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "externals plugin for vite", | ||
@@ -5,0 +5,0 @@ "author": "crcong", |
# vite-plugin-externals | ||
English | [简体中文](README.zh-CN.md) | ||
use to external resources, like webpack externals, but only use in browser now. | ||
@@ -43,3 +45,3 @@ | ||
// transformed | ||
const Vue = window.Vue | ||
const Vue = window['Vue'] | ||
@@ -49,4 +51,4 @@ // source code | ||
// transformed | ||
const reactive = window.Vue.reactive | ||
const r = window.Vue.ref | ||
const reactive = window['Vue'].reactive | ||
const r = window['Vue'].ref | ||
``` | ||
@@ -94,2 +96,4 @@ | ||
**Warning**: If your module name has special characters, such as `/`, set useWindow option `false`, will throw error. | ||
```js | ||
@@ -102,4 +106,4 @@ viteExternalsPlugin({ | ||
import Vue from 'vue' | ||
// transformed, no `const Vue = window.Vue` | ||
// transformed, no `const Vue = window['Vue']` | ||
const Vue = Vue | ||
``` |
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
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
13451
13
106