duckdb / duckdb-wasm

WebAssembly version of DuckDB
https://shell.duckdb.org
MIT License
1.19k stars 125 forks source link

Compile npm modules to JavaScript #1146

Open multimeric opened 1 year ago

multimeric commented 1 year ago

It seems that the @duckdb/react-duckdb* npm packages contain raw typescript source code, which is fairly unusual. It means that consumers of the packages need to enable the typescript loader for node_modules, which is quite computationally expensive.

You can see this here on npm:

Interestingly, the @duckdb/duckdb-wasm* packages are correctly compiled to JS. Could you please pre-compile these packages to standard JavaScript in future versions? Thanks.

Mause commented 1 year ago

These packages aren't really intended for public consumption, and I'm surprised they're being published to npm. I assume that's why they're a bit odd?

multimeric commented 1 year ago

Probably, but I do think they're useful packages to have on npm.

keller-mark commented 6 months ago

I second the point that @duckdb/react-duckdb would be useful to have on NPM in their compiled form. The implementation looks very clean, minimal, and generic.

Otherwise, any user who wants to use DuckDB in a React application will end-up re-implementing the wheel in order to instantiate the database and access it from within sub-components.