vite-plugin-external-cdn 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.mjs +2 -2
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
<p>
|
|
7
7
|
A <a href="https://vitejs.dev/">Vite</a> plugin to convert dependencies to cdn at build time usingPlugin for <a href="https://github.com/eight04/rollup-plugin-external-globals">rollup-plugin-external-globals</a>.
|
|
8
8
|
</p>
|
|
9
|
+
<img src="https://img.shields.io/node/v/vite-plugin-external-cdn" alt="node-current" />
|
|
10
|
+
<img src="https://img.shields.io/npm/dependency-version/vite-plugin-external-cdn/peer/vite" alt="npm peer dependency version" />
|
|
11
|
+
<img src="https://img.shields.io/github/v/release/Zuojiangtao/vite-plugin-external-cdn" alt="GitHub release" />
|
|
12
|
+
<img src="https://img.shields.io/npm/l/vite-plugin-external-cdn" alt="licence" />
|
|
9
13
|
</div>
|
|
10
14
|
|
|
11
15
|
## Installation
|
package/dist/index.d.mts
CHANGED
|
@@ -135,4 +135,4 @@ declare const modulesConfig: {
|
|
|
135
135
|
type ModuleName = keyof typeof modulesConfig;
|
|
136
136
|
declare function autoComplete(name: ModuleName): (prodUrl: string) => Module;
|
|
137
137
|
|
|
138
|
-
export { Options, autoComplete, transformExternalCDN as default, transformExternalCDN as importToCDN };
|
|
138
|
+
export { type Options, autoComplete, transformExternalCDN as default, transformExternalCDN as importToCDN };
|
package/dist/index.d.ts
CHANGED
|
@@ -135,4 +135,4 @@ declare const modulesConfig: {
|
|
|
135
135
|
type ModuleName = keyof typeof modulesConfig;
|
|
136
136
|
declare function autoComplete(name: ModuleName): (prodUrl: string) => Module;
|
|
137
137
|
|
|
138
|
-
export { Options, autoComplete, transformExternalCDN as default, transformExternalCDN as importToCDN };
|
|
138
|
+
export { type Options, autoComplete, transformExternalCDN as default, transformExternalCDN as importToCDN };
|
package/dist/index.js
CHANGED
|
@@ -28,13 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
autoComplete: () => autoComplete,
|
|
34
|
-
default: () =>
|
|
34
|
+
default: () => index_default,
|
|
35
35
|
importToCDN: () => transformExternalCDN
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
|
|
39
39
|
// src/transform.ts
|
|
40
40
|
var import_rollup_plugin_external_globals = __toESM(require("rollup-plugin-external-globals"));
|
|
@@ -304,7 +304,7 @@ function autoComplete(name) {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
// src/index.ts
|
|
307
|
-
var
|
|
307
|
+
var index_default = transformExternalCDN;
|
|
308
308
|
// Annotate the CommonJS export names for ESM import in node:
|
|
309
309
|
0 && (module.exports = {
|
|
310
310
|
autoComplete,
|
package/dist/index.mjs
CHANGED
|
@@ -266,9 +266,9 @@ function autoComplete(name) {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
// src/index.ts
|
|
269
|
-
var
|
|
269
|
+
var index_default = transformExternalCDN;
|
|
270
270
|
export {
|
|
271
271
|
autoComplete,
|
|
272
|
-
|
|
272
|
+
index_default as default,
|
|
273
273
|
transformExternalCDN as importToCDN
|
|
274
274
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-external-cdn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A vite plugin to import dependencies as a CDN.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -26,25 +26,25 @@
|
|
|
26
26
|
"author": "zuojiangtao",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"rollup-plugin-external-globals": "^0.
|
|
29
|
+
"rollup-plugin-external-globals": "^0.13.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@commitlint/cli": "^17.6.7",
|
|
33
33
|
"@commitlint/config-conventional": "^17.6.7",
|
|
34
34
|
"@rushstack/eslint-patch": "^1.3.3",
|
|
35
|
-
"@types/node": "^
|
|
35
|
+
"@types/node": "^22.13.4",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
|
37
37
|
"@typescript-eslint/parser": "^6.3.0",
|
|
38
|
-
"eslint": "^8.
|
|
38
|
+
"eslint": "^8.57.0",
|
|
39
39
|
"eslint-config-prettier": "^9.0.0",
|
|
40
40
|
"eslint-plugin-prettier": "^5.0.0",
|
|
41
|
-
"husky": "^
|
|
42
|
-
"lint-staged": "^
|
|
43
|
-
"prettier": "^3.
|
|
44
|
-
"rimraf": "
|
|
45
|
-
"tsup": "
|
|
46
|
-
"typescript": "
|
|
47
|
-
"vite": "^4.
|
|
41
|
+
"husky": "^9.1.7",
|
|
42
|
+
"lint-staged": "^15.4.3",
|
|
43
|
+
"prettier": "^3.5.1",
|
|
44
|
+
"rimraf": "~6.0.1",
|
|
45
|
+
"tsup": "~8.3.6",
|
|
46
|
+
"typescript": "~5.7.3",
|
|
47
|
+
"vite": "^4.5.9"
|
|
48
48
|
},
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"src/**/*.{ts,js,json,tsx,jsx,vue}": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"vite": ">=
|
|
57
|
+
"vite": ">=4"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|