Rescript-compiler: Could we imagine a package with only bs-platform/lib js files?

Created on 6 Dec 2018  路  2Comments  路  Source: rescript-lang/rescript-compiler

I am writing something with reason and js (legacy to migrate step by step) but I am shipping generated code as js only (for now, via npm).

I would like to avoid my end-users to have to download the entire bs-platform package (because they don't have too). At the end they only need bs-platform/lib/*.js.

Can we think of a solution for this? Maybe a monorepo with multiple packages with one that only provide bs js files?

Most helpful comment

Hi @MoOx , that's something we are actively working on and hopefully to deliver a good solution in the future.
Currently the best bet is doing some post-processing around generated JS files or add bs-platform as a dependency.
Since this is a duplicated issue, I am going to close it.

All 2 comments

Hi @MoOx , that's something we are actively working on and hopefully to deliver a good solution in the future.
Currently the best bet is doing some post-processing around generated JS files or add bs-platform as a dependency.
Since this is a duplicated issue, I am going to close it.

I guess it's duplicate with https://github.com/BuckleScript/bucklescript/issues/2127 and maybe https://github.com/BuckleScript/bucklescript/issues/3164.
Thanks for the heads up. Will look into that.

If you need a hand on something I can try to help for the monorepo situation (if necessary, I understand that there is alternative to using a npm package and put directly consumed js and adjust paths).

Was this page helpful?
0 / 5 - 0 ratings