diff --git a/package.json b/package.json index 4a0f38b8..292be067 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,6 @@ "get-port": "^7.0.0", "giget": "^1.1.3", "hookable": "^5.5.3", - "immer": "^10.0.3", "is-wsl": "^3.0.0", "jiti": "^1.21.0", "json5": "^2.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9b482f0..d3b1011d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -62,9 +62,6 @@ importers: hookable: specifier: ^5.5.3 version: 5.5.3 - immer: - specifier: ^10.0.3 - version: 10.0.3 is-wsl: specifier: ^3.0.0 version: 3.1.0 @@ -2930,10 +2927,6 @@ packages: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} dev: false - /immer@10.0.3: - resolution: {integrity: sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==} - dev: false - /immutable@4.3.4: resolution: {integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==} diff --git a/src/core/utils/manifest.ts b/src/core/utils/manifest.ts index 3eab77d4..2a13e757 100644 --- a/src/core/utils/manifest.ts +++ b/src/core/utils/manifest.ts @@ -21,7 +21,6 @@ import { import { getPackageJson } from './package'; import { normalizePath } from './paths'; import { writeFileIfDifferent } from './fs'; -import { produce } from 'immer'; import defu from 'defu'; import { wxt } from '../wxt'; @@ -113,21 +112,22 @@ export async function generateManifest( if (wxt.config.command === 'serve') addDevModeCsp(manifest); if (wxt.config.command === 'serve') addDevModePermissions(manifest); - const finalManifest = produce(manifest, wxt.config.transformManifest); - await wxt.hooks.callHook('build:manifestGenerated', wxt, finalManifest); + // TODO: Remove in v1 + wxt.config.transformManifest(manifest); + await wxt.hooks.callHook('build:manifestGenerated', wxt, manifest); - if (finalManifest.name == null) + if (manifest.name == null) throw Error( "Manifest 'name' is missing. Either:\n1. Set the name in your /package.json\n2. Set a name via the manifest option in your wxt.config.ts", ); - if (finalManifest.version == null) { + if (manifest.version == null) { throw Error( "Manifest 'version' is missing. Either:\n1. Add a version in your /package.json\n2. Pass the version via the manifest option in your wxt.config.ts", ); } return { - manifest: finalManifest, + manifest, warnings, }; }