Skip to content

Commit 5e6b8c9

Browse files
vikermanjustinfagnani
authored andcommitted
Set type in package.json to "module"
This would let Node >=13 to load lit-html as ES modules without any other bundling tools. Move check-version-tracker file extension to .cjs to continue loading it as cjs. Fixes #973.
1 parent 8b4bb2a commit 5e6b8c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
File renamed without changes.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"license": "BSD-3-Clause",
66
"homepage": "https://lit-element.polymer-project.org/",
77
"repository": "Polymer/lit-element",
8+
"type": "module",
89
"main": "lit-element.js",
910
"module": "lit-element.js",
1011
"directories": {
@@ -31,7 +32,7 @@
3132
"checksize": "rollup -c ; rm lit-element.bundled.js",
3233
"format": "find src test | grep '\\.js$\\|\\.ts$' | xargs clang-format --style=file -i",
3334
"lint": "tslint --project ./",
34-
"prepublishOnly": "node check-version-tracker.js && npm run lint && npm test",
35+
"prepublishOnly": "node check-version-tracker.cjs && npm run lint && npm test",
3536
"prepare": "npm run build",
3637
"regen-package-lock": "rm -rf node_modules package-lock.json; npm install",
3738
"publish-dev": "npm test && VERSION=${npm_package_version%-*}-dev.`git rev-parse --short HEAD` && npm version --no-git-tag-version $VERSION && npm publish --tag dev",

0 commit comments

Comments
 (0)