build: ensure tslib is bundled with the cli (#33407)

This commit is contained in:
Cacie Prins
2026-02-24 15:53:13 -05:00
committed by GitHub
parent d0a3b9c36e
commit 94ff6dbcf3
+4 -2
View File
@@ -8,8 +8,10 @@ import path from 'path'
const pkg = JSON.parse(readFileSync('./package.json', 'utf8').toString())
function external (id, parent, resolved) {
// Bundle tslib so that we include ts helpers
if (id === 'tslib' || id.startsWith('tslib/') || id.includes('tslib/tslib.es6.js')) {
// Bundle tslib so that we include ts helpers (Windows resolves to absolute path with backslashes)
const idNorm = id.replace(/\\/g, '/')
if (id === 'tslib' || idNorm.startsWith('tslib') || idNorm.includes('tslib/tslib.es6.js')) {
return false
}