Skip to content

Commit

Permalink
fix: ensure package works as a module
Browse files Browse the repository at this point in the history
  • Loading branch information
jsakas committed Apr 14, 2023
1 parent c36ab5b commit e6f2acc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"description": "Simple HTML5 drag-drop zone with React.js",
"main": "dist/index.js",
"module": "dist/es/index.js",
"exports": {
".": {
"import": "./dist/es/index.js",
"require": "./dist/index.js"
}
},
"sideEffects": false,
"scripts": {
"cz": "git-cz",
Expand Down
4 changes: 3 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import accepts from "attr-accept";
import _accepts from "attr-accept";

const accepts = typeof _accepts === "function" ? _accepts : _accepts.default;

// Error codes
export const FILE_INVALID_TYPE = "file-invalid-type";
Expand Down

0 comments on commit e6f2acc

Please sign in to comment.