@crxjs/vite-plugin 2.2.0 → 2.2.1

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ConfigEnv, Plugin, PluginOption } from 'vite';
2
+ import { IsStringLiteral } from 'type-fest';
2
3
  import { Options } from 'fast-glob';
3
4
  import { PluginContext, OutputBundle } from 'rollup';
4
5
 
@@ -206,7 +207,8 @@ interface ManifestV3 {
206
207
  type ManifestV3Fn = (env: ConfigEnv) => ManifestV3 | Promise<ManifestV3>;
207
208
  type ManifestV3Export = ManifestV3 | Promise<ManifestV3> | ManifestV3Fn;
208
209
  type Code = '.' | '/' | '\\';
209
- type ManifestFilePath<T extends string> = T extends `${Code}${string}` ? never : T extends `${string}.${infer Ext}` ? Ext extends '' ? never : T : never;
210
+ type LiteralManifestFilePath<T extends string> = T extends `${Code}${string}` ? never : T extends `${string}.${infer Ext}` ? Ext extends '' ? never : T : never;
211
+ type ManifestFilePath<T extends string> = IsStringLiteral<T> extends true ? LiteralManifestFilePath<T> : T;
210
212
  interface ManifestIcons<T extends string> {
211
213
  [size: number]: ManifestFilePath<T>;
212
214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crxjs/vite-plugin",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Build Chrome Extensions with this Vite plugin.",
5
5
  "keywords": [
6
6
  "rollup-plugin",
@@ -100,6 +100,7 @@
100
100
  "rollup-plugin-dts": "^4.2.0",
101
101
  "rollup-plugin-esbuild": "4.10.3",
102
102
  "svelte": "^3.48.0",
103
+ "type-fest": "^5.1.0",
103
104
  "typescript": "^4.6.4",
104
105
  "vite": "^3.2.11",
105
106
  "vite-plugin-inspect": "0.7.25",