Browse Source

Add exports to package.json and type: module, #862

See the thread at https://github.com/markdown-it/markdown-it/pull/863

This adds exports which is the new standard way of defining what can be
required/imported from a Node package.

Additionally, it specifies the type of the package to be a module.
pull/863/head
Paul Irwin 7 months ago
parent
commit
ec80a2f6b7
  1. 11
      package.json

11
package.json

@ -13,6 +13,17 @@
"license": "MIT",
"main": "index.js",
"module": "dist/esm/markdown-it.mjs",
"type": "module",
"exports": {
".": {
"import": "./dist/esm/markdown-it.mjs",
"require": "./index.js"
},
"./*": {
"require": "./*",
"import": "./*"
}
},
"bin": {
"markdown-it": "bin/markdown-it.js"
},

Loading…
Cancel
Save