@crxjs/vite-plugin 2.0.0-beta.3 → 2.0.0-beta.30
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 +0 -0
- package/client.d.ts +15 -0
- package/dist/index.cjs +1 -1849
- package/dist/index.d.ts +38 -12
- package/dist/index.mjs +258 -85
- package/index.cjs +8 -0
- package/package.json +44 -43
package/index.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.assign(module.exports, require('./dist/index.cjs'))
|
|
2
|
+
|
|
3
|
+
// async functions, can be redirect from ESM build
|
|
4
|
+
const asyncFunctions = ['crx', 'chromeExtension', 'allFilesReady', 'filesReady']
|
|
5
|
+
asyncFunctions.forEach((name) => {
|
|
6
|
+
module.exports[name] = (...args) =>
|
|
7
|
+
import('./dist/index.mjs').then((i) => i[name](...args))
|
|
8
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crxjs/vite-plugin",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.30",
|
|
4
4
|
"description": "Build Chrome Extensions with this Vite plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rollup-plugin",
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"author": "Jack and Amy Steam <jacksteamdev@gmail.com>",
|
|
26
|
+
"type": "module",
|
|
26
27
|
"exports": {
|
|
27
28
|
".": {
|
|
28
|
-
"require": "./
|
|
29
|
+
"require": "./index.cjs",
|
|
29
30
|
"import": "./dist/index.mjs",
|
|
30
31
|
"types": "./dist/index.d.ts"
|
|
31
32
|
},
|
|
@@ -34,90 +35,90 @@
|
|
|
34
35
|
"types": "./client.d.ts"
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
|
-
"main": "
|
|
38
|
+
"main": "index.cjs",
|
|
38
39
|
"module": "dist/index.mjs",
|
|
39
40
|
"types": "dist/index.d.ts",
|
|
40
41
|
"files": [
|
|
41
42
|
"dist",
|
|
42
43
|
"types",
|
|
43
44
|
"manifest.schema.json",
|
|
44
|
-
"
|
|
45
|
+
"index.cjs",
|
|
45
46
|
"client.d.ts"
|
|
46
47
|
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"format": "prettier -w -c ../../.prettierrc.yaml",
|
|
49
|
-
"build": "run-s build:clean build:js",
|
|
50
|
-
"build:clean": "rimraf dist",
|
|
51
|
-
"build:js": "rollup -c rollup.config.ts --configPlugin esbuild",
|
|
52
|
-
"dev:js": "npm run build:js -- -w",
|
|
53
|
-
"dev:lint": "tsc --noEmit --watch",
|
|
54
|
-
"lint": "run-s lint:eslint lint:types",
|
|
55
|
-
"lint:eslint": "eslint \"{src,test}/**/*.ts\"",
|
|
56
|
-
"lint:types": "tsc --noEmit",
|
|
57
|
-
"test": "vitest --mode unit",
|
|
58
|
-
"test:e2e": "vitest --mode e2e",
|
|
59
|
-
"test:run": "run-s test:run:*",
|
|
60
|
-
"test:run:out": "vitest --run --mode out",
|
|
61
|
-
"test:run:e2e": "vitest --run --mode e2e",
|
|
62
|
-
"test:update": "run-s \"test:run:out --update\" \"test:run:e2e --update\""
|
|
63
|
-
},
|
|
64
48
|
"dependencies": {
|
|
65
49
|
"@rollup/pluginutils": "^4.1.2",
|
|
66
50
|
"@webcomponents/custom-elements": "^1.5.0",
|
|
67
51
|
"acorn-walk": "^8.2.0",
|
|
68
52
|
"cheerio": "^1.0.0-rc.10",
|
|
69
|
-
"
|
|
53
|
+
"convert-source-map": "^1.7.0",
|
|
70
54
|
"debug": "^4.3.3",
|
|
71
55
|
"es-module-lexer": "^0.10.0",
|
|
72
56
|
"fast-glob": "^3.2.11",
|
|
73
57
|
"fs-extra": "^10.0.1",
|
|
74
|
-
"get-port": "^6.1.2",
|
|
75
58
|
"jsesc": "^3.0.2",
|
|
76
|
-
"magic-string": "^0.
|
|
59
|
+
"magic-string": "^0.30.12",
|
|
77
60
|
"picocolors": "^1.0.0",
|
|
78
61
|
"react-refresh": "^0.13.0",
|
|
79
|
-
"rollup": "2.
|
|
62
|
+
"rollup": "2.79.2",
|
|
80
63
|
"rxjs": "7.5.7"
|
|
81
64
|
},
|
|
82
65
|
"devDependencies": {
|
|
83
66
|
"@extend-chrome/messages": "1.2.2",
|
|
84
67
|
"@extend-chrome/storage": "1.5.0",
|
|
85
|
-
"@rollup/plugin-alias": "
|
|
68
|
+
"@rollup/plugin-alias": "4.0.4",
|
|
86
69
|
"@rollup/plugin-commonjs": "21.1.0",
|
|
87
|
-
"@rollup/plugin-json": "^
|
|
70
|
+
"@rollup/plugin-json": "^5.0.0",
|
|
88
71
|
"@rollup/plugin-node-resolve": "13.2.0",
|
|
89
|
-
"@sveltejs/vite-plugin-svelte": "1.0
|
|
72
|
+
"@sveltejs/vite-plugin-svelte": "1.4.0",
|
|
90
73
|
"@types/acorn": "4.0.6",
|
|
91
|
-
"@types/chrome": "0.0.
|
|
74
|
+
"@types/chrome": "0.0.237",
|
|
75
|
+
"@types/convert-source-map": "^2.0.0",
|
|
92
76
|
"@types/debug": "4.1.7",
|
|
93
77
|
"@types/fs-extra": "9.0.13",
|
|
94
78
|
"@types/jest-image-snapshot": "^5.1.0",
|
|
95
79
|
"@types/jsesc": "3.0.1",
|
|
96
80
|
"@types/node": "17.0.18",
|
|
97
|
-
"@types/react": "17.0.
|
|
98
|
-
"@types/react-dom": "17.0.
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
100
|
-
"@typescript-eslint/parser": "5.
|
|
81
|
+
"@types/react": "17.0.52",
|
|
82
|
+
"@types/react-dom": "17.0.18",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "5.41.0",
|
|
84
|
+
"@typescript-eslint/parser": "5.41.0",
|
|
101
85
|
"@vitejs/plugin-react": "^2.1.0",
|
|
102
|
-
"@vitejs/plugin-vue": "3.
|
|
86
|
+
"@vitejs/plugin-vue": "3.2.0",
|
|
103
87
|
"chokidar": "^3.5.3",
|
|
104
|
-
"esbuild": "0.
|
|
88
|
+
"esbuild": "0.17.14",
|
|
105
89
|
"esbuild-runner": "2.2.2",
|
|
106
|
-
"eslint": "8.
|
|
90
|
+
"eslint": "8.43.0",
|
|
107
91
|
"eslint-plugin-react": "^7.29.4",
|
|
108
92
|
"jest-image-snapshot": "^5.2.0",
|
|
109
93
|
"npm-run-all": "^4.1.5",
|
|
110
|
-
"playwright-chromium": "1.
|
|
94
|
+
"playwright-chromium": "1.33.0",
|
|
111
95
|
"react": "17.0.2",
|
|
112
96
|
"react-dom": "17.0.2",
|
|
113
97
|
"rimraf": "3.0.2",
|
|
114
98
|
"rollup-plugin-dts": "^4.2.0",
|
|
115
|
-
"rollup-plugin-esbuild": "4.10.
|
|
99
|
+
"rollup-plugin-esbuild": "4.10.3",
|
|
116
100
|
"svelte": "^3.48.0",
|
|
117
101
|
"typescript": "^4.6.4",
|
|
118
|
-
"vite": "^3.
|
|
119
|
-
"vite-plugin-inspect": "0.7.
|
|
120
|
-
"vitest": "
|
|
121
|
-
"vue": "3.2.
|
|
102
|
+
"vite": "^3.2.11",
|
|
103
|
+
"vite-plugin-inspect": "0.7.25",
|
|
104
|
+
"vitest": "0.28.5",
|
|
105
|
+
"vue": "3.2.47"
|
|
106
|
+
},
|
|
107
|
+
"scripts": {
|
|
108
|
+
"format": "prettier -w -c ../../.prettierrc.yaml",
|
|
109
|
+
"build": "run-s build:clean build:js",
|
|
110
|
+
"build:clean": "rimraf dist",
|
|
111
|
+
"build:js": "rollup -c rollup.config.ts --configPlugin esbuild",
|
|
112
|
+
"dev:js": "npm run build:js -- -w",
|
|
113
|
+
"dev:lint": "tsc --noEmit --watch",
|
|
114
|
+
"lint": "run-s lint:eslint lint:types",
|
|
115
|
+
"lint:eslint": "eslint \"{src,test}/**/*.ts\"",
|
|
116
|
+
"lint:types": "tsc --noEmit",
|
|
117
|
+
"test": "vitest --mode unit",
|
|
118
|
+
"test:e2e": "vitest --mode e2e",
|
|
119
|
+
"test:run": "run-s test:run:*",
|
|
120
|
+
"test:run:out": "vitest --run --mode out",
|
|
121
|
+
"test:run:e2e": "vitest --run --mode e2e",
|
|
122
|
+
"test:update": "run-s \"test:run:out --update\" \"test:run:e2e --update\""
|
|
122
123
|
}
|
|
123
|
-
}
|
|
124
|
+
}
|