diff --git a/packages/wxt/src/core/utils/__tests__/manifest.test.ts b/packages/wxt/src/core/utils/__tests__/manifest.test.ts index f474bcad0..230f14704 100644 --- a/packages/wxt/src/core/utils/__tests__/manifest.test.ts +++ b/packages/wxt/src/core/utils/__tests__/manifest.test.ts @@ -836,30 +836,6 @@ describe('Manifest Utils', () => { }); describe('registration', () => { - it('should throw an error when registration=runtime for MV2', async () => { - const cs: ContentScriptEntrypoint = fakeContentScriptEntrypoint({ - options: { - registration: 'runtime', - }, - skipped: false, - }); - - const entrypoints = [cs]; - const buildOutput: Omit = { - publicAssets: [], - steps: [{ entrypoints: cs, chunks: [] }], - }; - setFakeWxt({ - config: { - manifestVersion: 2, - }, - }); - - await expect( - generateManifest(entrypoints, buildOutput), - ).rejects.toThrowError(); - }); - it('should add host_permissions instead of content_scripts when registration=runtime', async () => { const cs: ContentScriptEntrypoint = { type: 'content-script', diff --git a/packages/wxt/src/core/utils/manifest.ts b/packages/wxt/src/core/utils/manifest.ts index 67f00ac5b..364f749f1 100644 --- a/packages/wxt/src/core/utils/manifest.ts +++ b/packages/wxt/src/core/utils/manifest.ts @@ -412,14 +412,6 @@ function addEntrypoints( const runtimeContentScripts = contentScripts.filter( (cs) => cs.options.registration === 'runtime', ); - if ( - runtimeContentScripts.length > 0 && - wxt.config.manifestVersion === 2 - ) { - throw Error( - 'Cannot use `registration: "runtime"` with MV2 content scripts, it is a MV3-only feature.', - ); - } runtimeContentScripts.forEach((script) => { script.options.matches?.forEach((matchPattern) => { addHostPermission(manifest, matchPattern);