Skip to content

Commit 94ff6db

Browse files
authored
build: ensure tslib is bundled with the cli (#33407)
1 parent d0a3b9c commit 94ff6db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/rollup.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import path from 'path'
88
const pkg = JSON.parse(readFileSync('./package.json', 'utf8').toString())
99

1010
function external (id, parent, resolved) {
11-
// Bundle tslib so that we include ts helpers
12-
if (id === 'tslib' || id.startsWith('tslib/') || id.includes('tslib/tslib.es6.js')) {
11+
// Bundle tslib so that we include ts helpers (Windows resolves to absolute path with backslashes)
12+
const idNorm = id.replace(/\\/g, '/')
13+
14+
if (id === 'tslib' || idNorm.startsWith('tslib') || idNorm.includes('tslib/tslib.es6.js')) {
1315
return false
1416
}
1517

0 commit comments

Comments
 (0)