Skip to content

Commit

Permalink
adding compilation results with extension .d.cts and .d.mts
Browse files Browse the repository at this point in the history
  • Loading branch information
fermartin17 committed May 13, 2024
1 parent 2dd93c3 commit 05945d3
Show file tree
Hide file tree
Showing 3 changed files with 1,029 additions and 968 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ for dir in "${DIRS[@]}"; do
fi

# Run the build command
if ! npm run build; then
if ! rollup -c --bundleConfigAsCjs rollup.base.config.js; then
echo "Error: Failed to run 'npm run build' in directory: packages/$dir"
exit 1
fi
Expand Down
12 changes: 12 additions & 0 deletions rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ const configs = [
sourcemap: true,
exports: 'named',
},
{
file: pkg.main.replace('.js', '.d.cts'),
format: 'cjs',
sourcemap: false,
exports: 'named',
},
{
file: pkg.module.replace('.js', '.d.mts'),
format: 'esm',
sourcemap: false,
exports: 'named',
},
],
external: ['axios'],
plugins: [
Expand Down
Loading

0 comments on commit 05945d3

Please sign in to comment.