@crxjs/vite-plugin 1.0.10 → 1.0.13
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 +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +10 -10
- package/CHANGELOG.md +0 -73
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/
|
|
3
|
+
[](https://www.npmjs.com/package/@crxjs/vite-plugin)
|
|
4
4
|
[](https://github.com/crxjs/rollup-plugin-chrome-extension)
|
|
5
5
|

|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -70,8 +70,8 @@ async function manifestFiles(manifest, options = {}) {
|
|
|
70
70
|
const serviceWorker = manifest.background?.service_worker;
|
|
71
71
|
const htmlPages = htmlFiles(manifest);
|
|
72
72
|
const icons = [
|
|
73
|
-
Object.values(manifest.icons ?? {}),
|
|
74
|
-
Object.values(manifest.action?.default_icon ?? {})
|
|
73
|
+
Object.values(isString(manifest.icons) ? [manifest.icons] : manifest.icons ?? {}),
|
|
74
|
+
Object.values(isString(manifest.action?.default_icon) ? [manifest.action?.default_icon] : manifest.action?.default_icon ?? {})
|
|
75
75
|
].flat();
|
|
76
76
|
let webAccessibleResources = [];
|
|
77
77
|
if (manifest.web_accessible_resources) {
|
|
@@ -3512,7 +3512,9 @@ const pluginBackground = () => {
|
|
|
3512
3512
|
if (this.meta.watchMode) {
|
|
3513
3513
|
if (typeof port === "undefined")
|
|
3514
3514
|
throw new Error("server port is undefined in watch mode");
|
|
3515
|
-
loader = `import 'http
|
|
3515
|
+
loader = `import 'http:/localhost:${port}/@vite/env';
|
|
3516
|
+
`;
|
|
3517
|
+
loader += `import 'http://localhost:${port}${workerClientId}';
|
|
3516
3518
|
`;
|
|
3517
3519
|
if (worker)
|
|
3518
3520
|
loader += `import 'http://localhost:${port}/${worker}';
|
package/dist/index.mjs
CHANGED
|
@@ -37,8 +37,8 @@ async function manifestFiles(manifest, options = {}) {
|
|
|
37
37
|
const serviceWorker = manifest.background?.service_worker;
|
|
38
38
|
const htmlPages = htmlFiles(manifest);
|
|
39
39
|
const icons = [
|
|
40
|
-
Object.values(manifest.icons ?? {}),
|
|
41
|
-
Object.values(manifest.action?.default_icon ?? {})
|
|
40
|
+
Object.values(isString(manifest.icons) ? [manifest.icons] : manifest.icons ?? {}),
|
|
41
|
+
Object.values(isString(manifest.action?.default_icon) ? [manifest.action?.default_icon] : manifest.action?.default_icon ?? {})
|
|
42
42
|
].flat();
|
|
43
43
|
let webAccessibleResources = [];
|
|
44
44
|
if (manifest.web_accessible_resources) {
|
|
@@ -3479,7 +3479,9 @@ const pluginBackground = () => {
|
|
|
3479
3479
|
if (this.meta.watchMode) {
|
|
3480
3480
|
if (typeof port === "undefined")
|
|
3481
3481
|
throw new Error("server port is undefined in watch mode");
|
|
3482
|
-
loader = `import 'http
|
|
3482
|
+
loader = `import 'http:/localhost:${port}/@vite/env';
|
|
3483
|
+
`;
|
|
3484
|
+
loader += `import 'http://localhost:${port}${workerClientId}';
|
|
3483
3485
|
`;
|
|
3484
3486
|
if (worker)
|
|
3485
3487
|
loader += `import 'http://localhost:${port}/${worker}';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crxjs/vite-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Build Chrome Extensions with this Vite plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rollup-plugin",
|
|
@@ -83,24 +83,24 @@
|
|
|
83
83
|
"@rollup/plugin-commonjs": "21.1.0",
|
|
84
84
|
"@rollup/plugin-node-resolve": "13.2.0",
|
|
85
85
|
"@types/acorn": "4.0.6",
|
|
86
|
-
"@types/chrome": "0.0.
|
|
86
|
+
"@types/chrome": "0.0.190",
|
|
87
87
|
"@types/debug": "4.1.7",
|
|
88
88
|
"@types/fs-extra": "9.0.13",
|
|
89
|
-
"@types/jest": "27.5.
|
|
89
|
+
"@types/jest": "27.5.2",
|
|
90
90
|
"@types/jest-image-snapshot": "4.3.1",
|
|
91
91
|
"@types/jsesc": "3.0.1",
|
|
92
92
|
"@types/node": "17.0.18",
|
|
93
93
|
"@types/react": "17.0.44",
|
|
94
94
|
"@types/react-dom": "17.0.17",
|
|
95
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
96
|
-
"@typescript-eslint/parser": "5.
|
|
95
|
+
"@typescript-eslint/eslint-plugin": "5.27.1",
|
|
96
|
+
"@typescript-eslint/parser": "5.27.1",
|
|
97
97
|
"@vitejs/plugin-react": "1.3.2",
|
|
98
98
|
"@vitejs/plugin-vue": "2.3.3",
|
|
99
|
-
"esbuild": "0.14.
|
|
99
|
+
"esbuild": "0.14.43",
|
|
100
100
|
"esbuild-runner": "2.2.1",
|
|
101
|
-
"eslint": "8.
|
|
101
|
+
"eslint": "8.17.0",
|
|
102
102
|
"jest": "27.5.1",
|
|
103
|
-
"jest-image-snapshot": "
|
|
103
|
+
"jest-image-snapshot": "5.1.0",
|
|
104
104
|
"playwright-chromium": "1.21.1",
|
|
105
105
|
"react": "17.0.2",
|
|
106
106
|
"react-dom": "17.0.2",
|
|
@@ -114,10 +114,10 @@
|
|
|
114
114
|
"vue": "3.2.36"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
|
-
"vite": "
|
|
117
|
+
"vite": ">=2.9.0"
|
|
118
118
|
},
|
|
119
119
|
"optionalDependencies": {
|
|
120
|
-
"@vitejs/plugin-react": "
|
|
120
|
+
"@vitejs/plugin-react": ">=1.2.0"
|
|
121
121
|
},
|
|
122
122
|
"engines": {
|
|
123
123
|
"node": ">=14"
|
package/CHANGELOG.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# @crxjs/vite-plugin
|
|
2
|
-
|
|
3
|
-
## 1.0.10
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- f35c49e: Update READMEs
|
|
8
|
-
|
|
9
|
-
## 1.0.9
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- 8941353: Remove & refactor use of fs-extra
|
|
14
|
-
|
|
15
|
-
## 1.0.8
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- 8a09cb9: Optimize rollup input
|
|
20
|
-
|
|
21
|
-
## 1.0.7
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- e1604d8: Strip paths from content script resource match patterns
|
|
26
|
-
|
|
27
|
-
## 1.0.6
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- 63d102f: Automatically ignores `build.outDir` for server HMR, so the file
|
|
32
|
-
writer doesn't trigger a full reload.
|
|
33
|
-
|
|
34
|
-
Fixes flaky HMR updates for content scripts; Tailwind should work fine now 🥳
|
|
35
|
-
|
|
36
|
-
- a1e2728: Fix isImporter recursion
|
|
37
|
-
|
|
38
|
-
## 1.0.5
|
|
39
|
-
|
|
40
|
-
### Patch Changes
|
|
41
|
-
|
|
42
|
-
- 86adbec: Sometimes during development, an extension page may open before the
|
|
43
|
-
service worker has a chance to control fetch. The HTML file will load from the
|
|
44
|
-
file system, but the script tag might load from the dev server. This PR adds a
|
|
45
|
-
precontroller loader plugin to the dev server so that the extension page will
|
|
46
|
-
reload and the fetch handler will get the real HTML file from the server.
|
|
47
|
-
|
|
48
|
-
## 1.0.4
|
|
49
|
-
|
|
50
|
-
### Patch Changes
|
|
51
|
-
|
|
52
|
-
- b83a4bd: Check for manifest assets first in the project root, then check in
|
|
53
|
-
the public dir. Throw an informative error if the file does not exist in
|
|
54
|
-
either dir.
|
|
55
|
-
|
|
56
|
-
## 1.0.3
|
|
57
|
-
|
|
58
|
-
### Patch Changes
|
|
59
|
-
|
|
60
|
-
- 8b2e587: check service worker on interval from extension page
|
|
61
|
-
|
|
62
|
-
## 1.0.2
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- be8a1de: Remove unused code that throws when web accessible resources contains
|
|
67
|
-
an HTML file.
|
|
68
|
-
|
|
69
|
-
## 1.0.1
|
|
70
|
-
|
|
71
|
-
### Patch Changes
|
|
72
|
-
|
|
73
|
-
- d2b4f9e: feat: allow hash in manifest html urls
|