Skip to content

Commit

Permalink
Add CJS variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielku15 committed Feb 10, 2024
1 parent a7dd4bd commit f9e16cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/node/alphaskia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exports": {
".": {
"import": "./dist/alphaskia.mjs",
"require": "./dist/alphskia.js",
"types": "./dist/alphaskia.d.ts"
}
},
Expand Down
9 changes: 9 additions & 0 deletions lib/node/alphaskia/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ module.exports = [
{
input: `dist/lib/alphaskia.js`,
output: [
{
file: 'dist/alphaskia.js',
format: 'umd'
},
{
file: 'dist/alphaskia.mjs',
format: 'es'
Expand All @@ -18,6 +22,11 @@ module.exports = [
file: 'dist/alphaskia.min.mjs',
format: 'es',
plugins: [terser()]
},
{
file: 'dist/alphaskia.min.js',
format: 'umd',
plugins: [terser()]
}
].map(o => ({ ...commonOutput, ...o })),
external: ['url', 'path', 'fs', 'node:module'],
Expand Down

0 comments on commit f9e16cd

Please sign in to comment.