Commit Graph

8 Commits

Author SHA1 Message Date
RMidhunSuresh 6cd3c8ee2b Read config from URL 2022-04-20 12:42:07 +05:30
RMidhunSuresh 698d47e221 Enable plugins in config 2022-04-13 14:26:40 +05:30
Bruno Windels c31215bc2a less logging during build 2021-12-22 16:31:19 +01:00
Bruno Windels 3bee4b4585 bundle bs58 to avoid pain of bundle transitive dependency for lib users
bs58 depends on safe-buffer, which depends on buffer, which is a bit
of a pain to bundle as it is a built-in node module. You'd typically
replace buffer with a browser polyfill in your build system but:
 a) this is somewhat a pain to setup for simple apps
 b) the polyfill is way more than we need (6kb), so we prefer to bundle
    our minimal buffer replacement that uses Uint8Array. Since it is
    a transitive dependency, we need to bundle bs58 and all of its
    transitive dependencies (2.5kb) as well, so if users of hydrogen-sdk
    also use any of these, they'll be double included in their bundle.
2021-12-22 16:31:19 +01:00
Bruno Windels c921091957 run two vite builds for the sdk build, assets & js separately 2021-12-22 16:31:19 +01:00
Bruno Windels 6add3f1da3 WIP 2021-12-22 16:31:19 +01:00
Bruno Windels ceb0b5793b somewhat works, but not everything we need
it's missing still:
 - non-css assets like the download sandbox and the olm worker aren't written for some reason
 - the es and cjs lib.js entry points end up in assets with a hash for some reason
 - in these entry files, apart from our exports, something is adding an import statement for every import that was found in the tree
 - all assets are hashed even though the config tries to disable that
 - tests are included
2021-12-22 16:31:18 +01:00
Bruno Windels c11f0774eb move common parts of build config to separate file and merge with it 2021-12-22 16:31:18 +01:00