Skip to content

Commit

Permalink
Use separate exports for ES and CommonJS modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rejc2 committed Jan 23, 2023
1 parent f9311ad commit a3d3839
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/wrapper.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import cjsModule from './wavefile.js';

export const WaveFile = cjsModule.WaveFile;
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"license": "MIT",
"main": "./dist/wavefile.js",
"module": "./index.js",
"exports": {
"import": "./dist/wrapper.mjs",
"require": "./dist/wavefile.js"
},
"types": "./index.d.ts",
"bin": "./bin/wavefile.js",
"engines": {
Expand Down

0 comments on commit a3d3839

Please sign in to comment.