forked from mystiq/hydrogen-web
Merge pull request #633 from vector-im/bwindels/fix-sdk-build1
Attempt to fix SDK build and dev server errors for consuming app
This commit is contained in:
commit
5d15fce343
2 changed files with 26 additions and 12 deletions
|
@ -2,14 +2,6 @@
|
||||||
"name": "hydrogen-view-sdk",
|
"name": "hydrogen-view-sdk",
|
||||||
"description": "Embeddable matrix client library, including view components",
|
"description": "Embeddable matrix client library, including view components",
|
||||||
"version": "0.0.2",
|
"version": "0.0.2",
|
||||||
"main": "./hydrogen.cjs.js",
|
"main": "./hydrogen.es.js",
|
||||||
"exports": {
|
"type": "module"
|
||||||
".": {
|
|
||||||
"import": "./hydrogen.es.js",
|
|
||||||
"require": "./hydrogen.cjs.js"
|
|
||||||
},
|
|
||||||
"./paths/vite": "./paths/vite.js",
|
|
||||||
"./style.css": "./style.css"
|
|
||||||
},
|
|
||||||
"types": "types/lib.d.ts"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,29 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const appManifest = require("../../package.json")
|
const appManifest = require("../../package.json");
|
||||||
const baseSDKManifest = require("./base-manifest.json")
|
const baseSDKManifest = require("./base-manifest.json");
|
||||||
|
/*
|
||||||
|
need to leave exports out of base-manifest.json because of #vite-bug,
|
||||||
|
with the downside that we can't support environments that support
|
||||||
|
both esm and commonjs modules, so we pick just esm.
|
||||||
|
```
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./hydrogen.es.js",
|
||||||
|
"require": "./hydrogen.cjs.js"
|
||||||
|
},
|
||||||
|
"./paths/vite": "./paths/vite.js",
|
||||||
|
"./style.css": "./style.css"
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
Also need to leave typescript type definitions out until the
|
||||||
|
typescript conversion is complete and all imports in the d.ts files
|
||||||
|
exists.
|
||||||
|
```
|
||||||
|
"types": "types/lib.d.ts"
|
||||||
|
```
|
||||||
|
*/
|
||||||
const mergeOptions = require('merge-options');
|
const mergeOptions = require('merge-options');
|
||||||
|
|
||||||
const manifestExtension = {
|
const manifestExtension = {
|
||||||
|
|
Loading…
Reference in a new issue