Skip to content

Commit

Permalink
ESM support
Browse files Browse the repository at this point in the history
fixes #977
  • Loading branch information
btakita committed Mar 1, 2023
1 parent aa00468 commit 632f1f6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions esm/index.browser.mjs
@@ -0,0 +1,2 @@
import '../papaparse.js';
export default globalThis.Papa;
3 changes: 3 additions & 0 deletions esm/index.mjs
@@ -0,0 +1,3 @@
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
export default require('../papaparse.js');
4 changes: 4 additions & 0 deletions esm/package.json
@@ -0,0 +1,4 @@
{
"main": "./index.mjs",
"browser": "./index.browser.mjs"
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -35,6 +35,7 @@
},
"license": "MIT",
"main": "papaparse.js",
"module": "papaparse.mjs",
"browser": "papaparse.min.js",
"devDependencies": {
"chai": "^4.2.0",
Expand Down
2 changes: 2 additions & 0 deletions papaparse.mjs
@@ -0,0 +1,2 @@
import Papa from './esm';
export default Papa;

0 comments on commit 632f1f6

Please sign in to comment.