Skip to content

Commit

Permalink
feat: add support for commonjs modules in bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
reconbot committed Aug 27, 2023
1 parent d84111c commit f04cb25
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
],
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-node-resolve": "15.2.1",
"@rollup/plugin-typescript": "11.1.3",
"@types/node": "20.5.6",
Expand Down
62 changes: 62 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import resolve from '@rollup/plugin-node-resolve'
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import typescript from '@rollup/plugin-typescript'

export default {
input: './lib/index.ts',
plugins: [
typescript(),
resolve({}),
nodeResolve(),
commonjs(),
],
output: [
{ format: 'esm', file: './dist/index-esm.mjs' },
Expand Down

0 comments on commit f04cb25

Please sign in to comment.