Skip to content

Commit

Permalink
package.json: Switch from "main" to "exports" (#50)
Browse files Browse the repository at this point in the history
This allows to actually do `import balanced from 'balanced-match'`

While currently you need to do `import balanced from 'balanced-match/index.js'`

See: <https://nodejs.org/api/packages.html>
  • Loading branch information
lanodan committed Oct 7, 2023
1 parent 7e7530b commit b704dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "git://github.com/juliangruber/balanced-match.git"
},
"homepage": "https://github.com/juliangruber/balanced-match",
"main": "index.js",
"exports": "./index.js",
"type": "module",
"scripts": {
"test": "standard --fix && node--test test/test.js",
Expand Down

0 comments on commit b704dff

Please sign in to comment.