Avoid ERR_REQUIRE_ESM errors when requiring SDK

This commit is contained in:
Eric Eastwood 2022-04-05 18:17:14 -05:00
parent 95d17303c3
commit dd06d78a72
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,8 @@
"test:postcss": "impunity --entry-point scripts/postcss/test.js ",
"start": "vite --port 3000",
"build": "vite build",
"build:sdk": "./scripts/sdk/build.sh"
"build:sdk": "./scripts/sdk/build.sh",
"watch:sdk": "./scripts/sdk/build.sh && yarn run vite build -c vite.sdk-lib-config.js --watch"
},
"repository": {
"type": "git",

View File

@ -2,7 +2,7 @@
"name": "hydrogen-view-sdk",
"description": "Embeddable matrix client library, including view components",
"version": "0.0.9",
"main": "./hydrogen.cjs.js",
"main": "./lib-build/hydrogen.cjs.js",
"exports": {
".": {
"import": "./lib-build/hydrogen.es.js",
@ -13,6 +13,5 @@
"./main.js": "./asset-build/assets/main.js",
"./download-sandbox.html": "./asset-build/assets/download-sandbox.html",
"./assets/*": "./asset-build/assets/*"
},
"type": "module"
}
}