Skip to content

Commit

Permalink
fix: generate valid javascript modules in build (#1080)
Browse files Browse the repository at this point in the history
Before this change snabbdom could only be consumed by bundlers like webpack.
Now we add the `.js` extension to the build outputs so browsers can import the modules directly as well.
ISSUES FIXED: #963
  • Loading branch information
mreinstein committed Nov 29, 2023
1 parent f5fcde3 commit 7ec0e90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"types": "build/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc",
"build": "tsc && ts-add-js-extension --dir=build",
"examples": "serve .",
"format": "prettier --write .",
"prepare": "husky install",
Expand Down Expand Up @@ -65,6 +65,7 @@
"prettier": "^3.0.3",
"release-it": "^16.2.1",
"serve": "^14.2.1",
"ts-add-js-extension": "^1.6.0",
"typescript": "5.2.2"
},
"prettier": {
Expand Down

0 comments on commit 7ec0e90

Please sign in to comment.