Skip to content

Commit

Permalink
working esm server side build on vite when the vite-plugin-top-level-…
Browse files Browse the repository at this point in the history
…await plugin package is used

See vitejs/vite#12253

See mholt#978
  • Loading branch information
btakita committed Mar 1, 2023
1 parent 632f1f6 commit ff8ae31
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 0 additions & 2 deletions esm/index.browser.mjs

This file was deleted.

3 changes: 0 additions & 3 deletions esm/index.mjs

This file was deleted.

4 changes: 0 additions & 4 deletions esm/package.json

This file was deleted.

7 changes: 5 additions & 2 deletions papaparse.mjs
@@ -1,2 +1,5 @@
import Papa from './esm';
export default Papa;
let createRequire;
try {
createRequire = await import('module').then(module=>module.createRequire);
} catch (error) {}
export default createRequire ? createRequire(import.meta.url)('./papaparse.js') : undefined;

0 comments on commit ff8ae31

Please sign in to comment.