Skip to content

Make bsb able to compile all third-party artifacts into the top-level lib/ #2418

@chenglou

Description

@chenglou

Folks might accidentally use npm link or npm install local/path and have npm symlink the dependency into their own project, either for testing or for whatever other purposes. This is a common scenario and because bsb places artifacts inside these symlinked dirs, some weird behaviors happen.

I think it's reasonable to provide an option to ask bsb to output artifacts outside of the third-party dirs. Maybe in the top-level lib/js folder. Maybe we can pass it as a CLI flag while we're at it so that we don't need to care where to place the artifacts. This allows us to interop with other package managers and workflows better without too much cost.

It'd be a config from the top-level that overrides whatever the third-party bsconfig says.

cc @bsansouci who needed this

Edit: the flag approach might be better, e.g. bsb -artifacts-location foo/bar (is ninja ok with this?). We might need flags soon anyway if we want to have a dev vs prod mode (for e.g. printing debugging?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions