@crxjs/vite-plugin 2.0.0-beta.17 → 2.0.0-beta.18

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.d.ts CHANGED
@@ -166,6 +166,9 @@ interface ManifestV3 {
166
166
  pages: string[];
167
167
  content_security_policy?: string | undefined;
168
168
  } | undefined;
169
+ side_panel?: {
170
+ default_path?: string | undefined;
171
+ } | undefined;
169
172
  short_name?: string | undefined;
170
173
  spellcheck?: {
171
174
  dictionary_language?: string | undefined;
package/dist/index.mjs CHANGED
@@ -1022,7 +1022,8 @@ function htmlFiles(manifest) {
1022
1022
  manifest.devtools_page,
1023
1023
  manifest.options_page,
1024
1024
  manifest.options_ui?.page,
1025
- manifest.sandbox?.pages
1025
+ manifest.sandbox?.pages,
1026
+ manifest.side_panel?.default_path
1026
1027
  ].flat().filter(isString).map((s) => s.split("#")[0]).sort();
1027
1028
  return [...new Set(files)];
1028
1029
  }
@@ -1712,7 +1713,11 @@ function compileFileResources(fileName, {
1712
1713
  assets: /* @__PURE__ */ new Set(),
1713
1714
  css: /* @__PURE__ */ new Set(),
1714
1715
  imports: /* @__PURE__ */ new Set()
1715
- }) {
1716
+ }, processedFiles = /* @__PURE__ */ new Set()) {
1717
+ if (processedFiles.has(fileName)) {
1718
+ return resources;
1719
+ }
1720
+ processedFiles.add(fileName);
1716
1721
  const chunk = chunks.get(fileName);
1717
1722
  if (chunk) {
1718
1723
  const { modules, facadeModuleId, imports, dynamicImports } = chunk;
@@ -1721,7 +1726,7 @@ function compileFileResources(fileName, {
1721
1726
  for (const x of dynamicImports)
1722
1727
  resources.imports.add(x);
1723
1728
  for (const x of [...imports, ...dynamicImports])
1724
- compileFileResources(x, { chunks, files, config }, resources);
1729
+ compileFileResources(x, { chunks, files, config }, resources, processedFiles);
1725
1730
  for (const m of Object.keys(modules))
1726
1731
  if (m !== facadeModuleId) {
1727
1732
  const key = prefix$1("/", relative(config.root, m.split("?")[0]));
@@ -1734,7 +1739,8 @@ function compileFileResources(fileName, {
1734
1739
  compileFileResources(
1735
1740
  script.fileName,
1736
1741
  { chunks, files, config },
1737
- resources
1742
+ resources,
1743
+ processedFiles
1738
1744
  );
1739
1745
  }
1740
1746
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crxjs/vite-plugin",
3
- "version": "2.0.0-beta.17",
3
+ "version": "2.0.0-beta.18",
4
4
  "description": "Build Chrome Extensions with this Vite plugin.",
5
5
  "keywords": [
6
6
  "rollup-plugin",
@@ -26,7 +26,7 @@
26
26
  "type": "module",
27
27
  "exports": {
28
28
  ".": {
29
- "require": "./index.cjs",
29
+ "require": "./dist/index.cjs",
30
30
  "import": "./dist/index.mjs",
31
31
  "types": "./dist/index.d.ts"
32
32
  },
@@ -83,13 +83,13 @@
83
83
  "devDependencies": {
84
84
  "@extend-chrome/messages": "1.2.2",
85
85
  "@extend-chrome/storage": "1.5.0",
86
- "@rollup/plugin-alias": "4.0.2",
86
+ "@rollup/plugin-alias": "4.0.4",
87
87
  "@rollup/plugin-commonjs": "21.1.0",
88
88
  "@rollup/plugin-json": "^5.0.0",
89
89
  "@rollup/plugin-node-resolve": "13.2.0",
90
- "@sveltejs/vite-plugin-svelte": "1.1.0",
90
+ "@sveltejs/vite-plugin-svelte": "1.4.0",
91
91
  "@types/acorn": "4.0.6",
92
- "@types/chrome": "0.0.209",
92
+ "@types/chrome": "0.0.237",
93
93
  "@types/convert-source-map": "^2.0.0",
94
94
  "@types/debug": "4.1.7",
95
95
  "@types/fs-extra": "9.0.13",
@@ -105,7 +105,7 @@
105
105
  "chokidar": "^3.5.3",
106
106
  "esbuild": "0.17.14",
107
107
  "esbuild-runner": "2.2.2",
108
- "eslint": "8.39.0",
108
+ "eslint": "8.43.0",
109
109
  "eslint-plugin-react": "^7.29.4",
110
110
  "jest-image-snapshot": "^5.2.0",
111
111
  "npm-run-all": "^4.1.5",
@@ -114,7 +114,7 @@
114
114
  "react-dom": "17.0.2",
115
115
  "rimraf": "3.0.2",
116
116
  "rollup-plugin-dts": "^4.2.0",
117
- "rollup-plugin-esbuild": "4.10.1",
117
+ "rollup-plugin-esbuild": "4.10.3",
118
118
  "svelte": "^3.48.0",
119
119
  "typescript": "^4.6.4",
120
120
  "vite": "^3.1.7",