jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.06k stars 216 forks source link

Update build system, add support for ESM, and remove HTML5FS #357

Closed james-pre closed 1 year ago

james-pre commented 1 year ago

This PR changes the build system from Rollup and Webpack to Esbuild. This has some major performance benefits (10x to 100x faster build) in addition to cutting the number of installed dependencies in half.

This PR also adds support for ESM with node and adds building for ESM.

HTML5FS is no longer viable since the standards making writing to it possible are deprecated. Furthermore, it used a number of outdated and incorrect types. It could not be used outside of Chrome and created a number of compatibility issues for BrowserFS.

Finally, this PR changes many encoding parameters to use Node's BufferEncoding and changes imports Buffer from the buffer package to correctly build.

Resolves #344