mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
remove exports field to try and prevent vite bug resolving asset url
downside is that we can't export cjs version anymore
This commit is contained in:
parent
a5eb386f48
commit
d7290bf750
@ -2,14 +2,7 @@
|
|||||||
"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",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"import": "./hydrogen.es.js",
|
|
||||||
"require": "./hydrogen.cjs.js"
|
|
||||||
},
|
|
||||||
"./paths/vite": "./paths/vite.js",
|
|
||||||
"./style.css": "./style.css"
|
|
||||||
},
|
|
||||||
"types": "types/lib.d.ts"
|
"types": "types/lib.d.ts"
|
||||||
|
"main": "./hydrogen.es.js",
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
19
scripts/sdk/create-manifest.js
Executable file → Normal file
19
scripts/sdk/create-manifest.js
Executable file → Normal file
@ -1,7 +1,22 @@
|
|||||||
#!/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"
|
||||||
|
},
|
||||||
|
```
|
||||||
|
*/
|
||||||
const mergeOptions = require('merge-options');
|
const mergeOptions = require('merge-options');
|
||||||
|
|
||||||
const manifestExtension = {
|
const manifestExtension = {
|
||||||
|
Loading…
Reference in New Issue
Block a user