-
Notifications
You must be signed in to change notification settings - Fork 471
Closed
Description
The seems to be no way at the moment to use BuckleScript generated JS code in apps or libraries without forcing consumers to include bs-platform
in their dependencies, or authors to bundle their code.
A real world case can be found in VS Code extensions (node.js apps). Publishing a VS Code extension with bs-platform
in package.json
would mean hundreds of MBs are sent to Microsoft publishing servers. Actually, any regular node.js app will have a similar problem when being deployed.
I'm pretty sure this has been discussed before, but I'm interested in the minimum work required to make this happen:
- Use lerna or a custom script to automate this new package publishing
- Add an option in
bsconfig.json
package-specs
so the output JS requires from this new package optionally. Or alternatively, make the separate package the only option. - Change the compiler so the new package name is used on each module that depends on
/lib/js
Happy to help with this.
Related:
- Generated code requires modules from bs-platform, forcing an extra production dependancy #2082: Generated code requires modules from bs-platform, forcing an extra production dependancy
- Treat stdlib as normal package #1187: Treat stdlib as a normal package
- [Discussion] Start of the stdlib infra #1860: [Discussion] Start of the stdlib infra
jaredly, lpil, rrdelaney, ncthbrt, arialpew and 16 more
Metadata
Metadata
Assignees
Labels
No labels