Skip to content

Instantly share code, notes, and snippets.

@travishorn
Last active February 8, 2022 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travishorn/6d859e21deba26ef49fbd23fa35d5a68 to your computer and use it in GitHub Desktop.
Save travishorn/6d859e21deba26ef49fbd23fa35d5a68 to your computer and use it in GitHub Desktop.
npm init for pure ESM package

Use this package.json for initializing new npm packages. It will make the package a pure ESM package. Feel free to fork this and replace the author and/or license information.

{
"name": "myapp",
"version": "0.1.0",
"description": "",
"exports": "./index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Travis Horn <travis@travishorn.com> (https://travishorn.com/)",
"license": "MIT",
"type": "module",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment