Skip to content

Commit 0fa80b4

Browse files
committed
feat: release an esm distribution
1 parent 7265818 commit 0fa80b4

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "@enginehub/schematicwebviewer",
3-
"version": "4.2.3",
3+
"version": "4.3.0",
44
"description": "A web viewer for modern Minecraft schematics",
5-
"main": "dist/index.js",
5+
"main": "dist/cjs/index.js",
6+
"module": "dist/esm/index.js",
7+
"types": "dist/esm/index.d.ts",
68
"files": [
79
"dist/"
810
],
911
"scripts": {
10-
"prepublish": "rm -rf dist && tsc",
11-
"build": "tsc",
12+
"prepublish": "rm -rf dist && yarn build",
13+
"build": "tsc && tsc --module commonjs --outDir dist/cjs",
1214
"test": "echo \"Error: no test specified\" && exit 1",
1315
"start": "parcel test/test.html --port 3000 --host 0.0.0.0",
1416
"type-check": "tsc --noEmit",

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"include": ["src/**/*"],
33
"compilerOptions": {
4-
"outDir": "./dist/",
4+
"outDir": "dist/esm",
55
"sourceMap": true,
66
"noImplicitAny": false,
77
"esModuleInterop": true,
88
"downlevelIteration": true,
9+
"moduleResolution": "node",
910
"resolveJsonModule": true,
10-
"module": "commonjs",
11+
"module": "esnext",
1112
"lib": ["es2017", "es7", "es6", "dom"],
1213
"target": "es6",
1314
"allowJs": true,

0 commit comments

Comments
 (0)