Skip to content

Commit

Permalink
Add support for ESM-style node imports (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmyersdev authored Jul 9, 2022
1 parent f1c181c commit eebc657
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"immutable"
],
"repository": "https://github.com/moment/luxon",
"exports": {
".": {
"import": "./src/luxon.js",
"require": "./build/node/luxon.js"
}
},
"scripts": {
"build": "babel-node tasks/buildAll.js",
"build-node": "babel-node tasks/buildNode.js",
Expand All @@ -21,6 +27,7 @@
"format-check": "prettier --check 'src/**/*.js' 'test/**/*.js' 'benchmarks/*.js'",
"benchmark": "babel-node benchmarks/index.js",
"codecov": "codecov",
"prepack": "babel-node tasks/buildAll.js",
"prepare": "husky install"
},
"lint-staged": {
Expand Down
3 changes: 3 additions & 0 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}

0 comments on commit eebc657

Please sign in to comment.