@crxjs/vite-plugin 1.0.7 → 1.0.8
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +16 -5
- package/dist/index.mjs +16 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2784,17 +2784,28 @@ const pluginManifest = (_manifest) => () => {
|
|
|
2784
2784
|
async config(config2, env) {
|
|
2785
2785
|
manifest = await (typeof _manifest === "function" ? _manifest(env) : _manifest);
|
|
2786
2786
|
if (manifest.manifest_version !== 3)
|
|
2787
|
-
throw new Error(`Manifest v${manifest.manifest_version}
|
|
2787
|
+
throw new Error(`CRXJS does not support Manifest v${manifest.manifest_version}, please use Manifest v3`);
|
|
2788
2788
|
if (env.command === "serve") {
|
|
2789
2789
|
const {
|
|
2790
2790
|
contentScripts: js,
|
|
2791
2791
|
background: sw,
|
|
2792
2792
|
html
|
|
2793
2793
|
} = await manifestFiles(manifest);
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2794
|
+
const { entries = [] } = config2.optimizeDeps ?? {};
|
|
2795
|
+
let { input = [] } = config2.build?.rollupOptions ?? {};
|
|
2796
|
+
if (typeof input === "string")
|
|
2797
|
+
input = [input];
|
|
2798
|
+
else
|
|
2799
|
+
input = Object.values(input);
|
|
2800
|
+
input = input.map((f) => {
|
|
2801
|
+
let result = f;
|
|
2802
|
+
if (isAbsolute(f)) {
|
|
2803
|
+
result = relative(config2.root ?? process.cwd(), f);
|
|
2804
|
+
}
|
|
2805
|
+
return result;
|
|
2806
|
+
});
|
|
2807
|
+
const set = new Set([entries, input].flat());
|
|
2808
|
+
for (const x of [js, sw, html].flat())
|
|
2798
2809
|
set.add(x);
|
|
2799
2810
|
return {
|
|
2800
2811
|
...config2,
|
package/dist/index.mjs
CHANGED
|
@@ -2751,17 +2751,28 @@ const pluginManifest = (_manifest) => () => {
|
|
|
2751
2751
|
async config(config2, env) {
|
|
2752
2752
|
manifest = await (typeof _manifest === "function" ? _manifest(env) : _manifest);
|
|
2753
2753
|
if (manifest.manifest_version !== 3)
|
|
2754
|
-
throw new Error(`Manifest v${manifest.manifest_version}
|
|
2754
|
+
throw new Error(`CRXJS does not support Manifest v${manifest.manifest_version}, please use Manifest v3`);
|
|
2755
2755
|
if (env.command === "serve") {
|
|
2756
2756
|
const {
|
|
2757
2757
|
contentScripts: js,
|
|
2758
2758
|
background: sw,
|
|
2759
2759
|
html
|
|
2760
2760
|
} = await manifestFiles(manifest);
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2761
|
+
const { entries = [] } = config2.optimizeDeps ?? {};
|
|
2762
|
+
let { input = [] } = config2.build?.rollupOptions ?? {};
|
|
2763
|
+
if (typeof input === "string")
|
|
2764
|
+
input = [input];
|
|
2765
|
+
else
|
|
2766
|
+
input = Object.values(input);
|
|
2767
|
+
input = input.map((f) => {
|
|
2768
|
+
let result = f;
|
|
2769
|
+
if (isAbsolute(f)) {
|
|
2770
|
+
result = relative(config2.root ?? process.cwd(), f);
|
|
2771
|
+
}
|
|
2772
|
+
return result;
|
|
2773
|
+
});
|
|
2774
|
+
const set = new Set([entries, input].flat());
|
|
2775
|
+
for (const x of [js, sw, html].flat())
|
|
2765
2776
|
set.add(x);
|
|
2766
2777
|
return {
|
|
2767
2778
|
...config2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crxjs/vite-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Build Chrome Extensions with this Vite plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rollup-plugin",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"@typescript-eslint/eslint-plugin": "5.23.0",
|
|
96
96
|
"@typescript-eslint/parser": "5.23.0",
|
|
97
97
|
"@vitejs/plugin-react": "1.3.2",
|
|
98
|
-
"@vitejs/plugin-vue": "2.3.
|
|
99
|
-
"esbuild": "0.14.
|
|
98
|
+
"@vitejs/plugin-vue": "2.3.3",
|
|
99
|
+
"esbuild": "0.14.42",
|
|
100
100
|
"esbuild-runner": "2.2.1",
|
|
101
101
|
"eslint": "8.15.0",
|
|
102
102
|
"jest": "27.5.1",
|