Skip to content

Commit

Permalink
Fix agentCompatibility transpilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Sep 1, 2024
1 parent 3ebd34a commit a784ff8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion build-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ export const kyPromise = cjsModule.kyPromise;

cat >dist/package.json <<!EOF
{
"type": "commonjs"
"type": "commonjs",
"browser": {
"./agentCompatibility.js": "./agentCompatibility-browser.js",
},
"react-native": {
"./agentCompatibility.js": "./agentCompatibility-browser.js"
}
}
!EOF

Expand Down
12 changes: 11 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ export default [
output: [
{
dir: 'dist',

format: 'cjs',
preserveModules: true
}
],
external: Object.keys(pkg.dependencies).concat(['crypto', 'util'])
},
{
input: './lib/agentCompatibility-browser.js',
output: [
{
dir: 'dist',
format: 'cjs',
preserveModules: true
}
Expand Down

0 comments on commit a784ff8

Please sign in to comment.