Skip to content

Commit

Permalink
fix: remove banner, minify identifiers, get version from package's pa…
Browse files Browse the repository at this point in the history
…ckage.json
  • Loading branch information
PalmDevs committed Oct 11, 2024
1 parent b01e751 commit 661b2a4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { buildSync } from 'esbuild'
import { dependencies } from './package.json' with { type: 'json' }
import { version } from './node_modules/react-devtools-core/package.json' with { type: 'json' }

buildSync({
entryPoints: ['index.js'],
outfile: 'dist/index.js',
bundle: true,
format: 'iife',
minify: true,
minifyIdentifiers: false,
define: {
__RDTC_VERSION: `"${dependencies['react-devtools-core']}"`
},
banner: {
js: "var window=globalThis,self=globalThis,console=new Proxy({},{get:()=>()=>void 0});"
__RDTC_VERSION: `"${version}"`
}
})
})

0 comments on commit 661b2a4

Please sign in to comment.