Skip to content
Prev Previous commit
Next Next commit
Don’t inline all env vars
Right now `NODE_PATH` gets inlined into the build causing linux binaries to additionally search for `/Users/runner/…` directories
  • Loading branch information
thecrypticace committed Nov 30, 2025
commit e1f6ad5df5a942c648e2f2d315d778b4a47ca69d
10 changes: 7 additions & 3 deletions packages/@tailwindcss-standalone/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ let start = process.hrtime.bigint()
for (let { target, name } of builds) {
let outfile = path.resolve(__dirname, `../dist/${name}`)

process.env.PLATFORM_LIBC = target.includes('-musl') ? 'musl' : 'glibc'

let result = await Bun.build({
entrypoints: ['./src/index.ts'],
target: 'node',
env: 'inline',

define: {
// This ensures only necessary binaries are bundled for linux targets
// It reduces binary size since no runtime selection is necessary
'process.env.PLATFORM_LIBC': JSON.stringify(target.includes('-musl') ? 'musl' : 'glibc'),
},

compile: {
target,
outfile,
Expand Down