Skip to content

Commit

Permalink
feat: Now exports both commonjs and esm builds, with type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocelyn Badgley (Twipped) committed Mar 12, 2023
1 parent ee6b168 commit 0c2e1c4
Show file tree
Hide file tree
Showing 7 changed files with 8,281 additions and 14,407 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/npm-debug.log
/.nyc_output
/coverage
/dist
18 changes: 18 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = exports = {
presets: [
[
'@babel/preset-env', {
useBuiltIns: 'entry',
corejs: 3,
exclude: [ 'transform-typeof-symbol' ],
modules: process.env.ESM ? false : 'cjs',
targets: 'maintained node versions',
},
],
],
plugins: process.env.NODE_ENV === 'test'
? []
: [
[ 'babel-plugin-add-import-extension', { extension: process.env.ESM ? 'mjs' : 'cjs' } ],
],
};
127 changes: 0 additions & 127 deletions index.js

This file was deleted.

0 comments on commit 0c2e1c4

Please sign in to comment.