@vearvip/vite-plugin-cdn-import 1.0.2 → 1.0.4

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/dist/index.cjs CHANGED
@@ -199,7 +199,7 @@ function genModuleByName(name) {
199
199
  `The configuration of module ${name} in ${prodUrl} does not exist `
200
200
  );
201
201
  } else {
202
- if (!(isJsdeliver(prodUrl) || isUnpkg(prodUrl)) || isBootCdn(prodUrl)) {
202
+ if (!isJsdeliver(prodUrl) || !isUnpkg(prodUrl) || !isCdnjs(prodUrl) || !isBootCdn(prodUrl)) {
203
203
  console.warn(
204
204
  "Unknown CDN, please ensure that this CDN supports jsdelivr rules"
205
205
  );
package/dist/index.js CHANGED
@@ -166,7 +166,7 @@ function genModuleByName(name) {
166
166
  `The configuration of module ${name} in ${prodUrl} does not exist `
167
167
  );
168
168
  } else {
169
- if (!(isJsdeliver(prodUrl) || isUnpkg(prodUrl)) || isBootCdn(prodUrl)) {
169
+ if (!isJsdeliver(prodUrl) || !isUnpkg(prodUrl) || !isCdnjs(prodUrl) || !isBootCdn(prodUrl)) {
170
170
  console.warn(
171
171
  "Unknown CDN, please ensure that this CDN supports jsdelivr rules"
172
172
  );
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
- {
2
- "name": "@vearvip/vite-plugin-cdn-import",
3
- "version": "1.0.2",
4
- "description": "Import packages from CDN for the vite plugin",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.cjs"
13
- }
14
- },
15
- "keywords": [
16
- "vite cdn plugin",
17
- "vite CDN extension"
18
- ],
19
- "files": [
20
- "dist"
21
- ],
22
- "publishConfig": {
23
- "access": "public",
24
- "registry": "https://registry.npmjs.org"
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/vearvip/vite-plugin-cdn-import.git"
29
- },
30
- "scripts": {
31
- "dev": "npm run build -- --watch",
32
- "build": "tsup src/index.ts --dts --format cjs,esm",
33
- "example": "node ./scripts/run-example.js",
34
- "prepublishOnly": "npm run build",
35
- "prepare": "husky"
36
- },
37
- "author": "vear<vear.vip@qq.com>",
38
- "license": "MIT",
39
- "devDependencies": {
40
- "@types/node": "^20.12.7",
41
- "chalk": "^5.3.0",
42
- "execa": "^8.0.1",
43
- "husky": "^9.0.11",
44
- "lint-staged": "^15.2.2",
45
- "prettier": "^3.2.5",
46
- "tsup": "^8.0.2",
47
- "typescript": "^5.4.5",
48
- "vite": "^5.2.10"
49
- },
50
- "dependencies": {
51
- "rollup-plugin-external-globals": "^0.10.0",
52
- "vite-plugin-externals": "^0.6.2"
53
- },
54
- "lint-staged": {
55
- "*.{ts,js,tsx,json,css,scss,less}": [
56
- "prettier --write"
57
- ],
58
- "*.{scss,less}": [
59
- "stylelint --fix"
60
- ]
61
- }
62
- }
1
+ {
2
+ "name": "@vearvip/vite-plugin-cdn-import",
3
+ "version": "1.0.4",
4
+ "description": "Import packages from CDN for the vite plugin",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "keywords": [
16
+ "vite cdn plugin",
17
+ "vite CDN extension"
18
+ ],
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "registry": "https://registry.npmjs.org"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/vearvip/vite-plugin-cdn-import.git"
29
+ },
30
+ "scripts": {
31
+ "dev": "npm run build -- --watch",
32
+ "build": "tsup src/index.ts --dts --format cjs,esm",
33
+ "example": "node ./scripts/run-example.js",
34
+ "prepublishOnly": "npm run build",
35
+ "prepare": "husky"
36
+ },
37
+ "author": "vear<vear.vip@qq.com>",
38
+ "license": "MIT",
39
+ "devDependencies": {
40
+ "@types/node": "^20.12.7",
41
+ "chalk": "^5.3.0",
42
+ "execa": "^8.0.1",
43
+ "husky": "^9.0.11",
44
+ "lint-staged": "^15.2.2",
45
+ "prettier": "^3.2.5",
46
+ "tsup": "^8.0.2",
47
+ "typescript": "^5.4.5",
48
+ "vite": "^5.2.10"
49
+ },
50
+ "dependencies": {
51
+ "rollup-plugin-external-globals": "^0.10.0",
52
+ "vite-plugin-externals": "^0.6.2"
53
+ },
54
+ "lint-staged": {
55
+ "*.{ts,js,tsx,json,css,scss,less}": [
56
+ "prettier --write"
57
+ ],
58
+ "*.{scss,less}": [
59
+ "stylelint --fix"
60
+ ]
61
+ }
62
+ }