Skip to content

Commit

Permalink
fix(api): include tslib dist in api package (#8130)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars committed Oct 28, 2023
1 parent 618c453 commit 822bf15
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-api-package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tauri-apps/api": patch:bug
---

Fix tslib missing in the distributed api package.
20 changes: 16 additions & 4 deletions tooling/api/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,26 @@ export default defineConfig([
{
format: 'esm',
dir: './dist',
entryFileNames: '[name].js',
preserveModules: true
preserveModules: true,
entryFileNames: (chunkInfo) => {
if (chunkInfo.name.includes('node_modules')) {
return chunkInfo.name.replace('node_modules', 'external') + '.js'
}

return '[name].js'
}
},
{
format: 'cjs',
dir: './dist',
entryFileNames: '[name].cjs',
preserveModules: true
preserveModules: true,
entryFileNames: (chunkInfo) => {
if (chunkInfo.name.includes('node_modules')) {
return chunkInfo.name.replace('node_modules', 'external') + '.cjs'
}

return '[name].cjs'
}
}
],
plugins: [
Expand Down

0 comments on commit 822bf15

Please sign in to comment.