Skip to content

Commit

Permalink
Clean up old workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
pierremtb committed Jan 3, 2025
1 parent 993c283 commit 273b354
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,13 @@ import react from '@vitejs/plugin-react'
import { crx } from '@crxjs/vite-plugin'
import manifest from './manifest.json'

const viteManifestHackIssue846: Plugin & {
renderCrxManifest: (manifest: any, bundle: any) => void
} = {
// Workaround from https://github.com/crxjs/chrome-extension-tools/issues/846#issuecomment-1861880919.
name: 'manifestHackIssue846',
renderCrxManifest(_manifest, bundle) {
bundle['manifest.json'] = bundle['.vite/manifest.json']
bundle['manifest.json'].fileName = 'manifest.json'
delete bundle['.vite/manifest.json']
},
}

export default defineConfig(() => {
return {
build: {
outDir: 'build',
},
plugins: [
react(),
viteManifestHackIssue846,
crx({ manifest }),
nodePolyfills(),
],
Expand Down

0 comments on commit 273b354

Please sign in to comment.