Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: Allow setting vite-node as node_toolchain #2038

Open
pat-trunk-io opened this issue Dec 14, 2024 · 1 comment
Open

[FR]: Allow setting vite-node as node_toolchain #2038

pat-trunk-io opened this issue Dec 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pat-trunk-io
Copy link

What is the current behavior?

Difficult or no examples on how to swap node with something like vite-node

Describe the feature

Trying to add vite-node as the node toolchain.
Smallest repro I could make:
https://github.com/pat-trunk-io/vite-note-rules-js

I would like to get to a point where running:

bazel run //src:test

would invoke vite-node as the node equivalent, which would then call node with the patched_fs node of rules_js

@pat-trunk-io pat-trunk-io added the enhancement New feature or request label Dec 14, 2024
@pat-trunk-io
Copy link
Author

pat-trunk-io commented Dec 14, 2024

Created a toolchain file:
https://github.com/pat-trunk-io/vite-note-rules-js/blob/main/toolchain/BUILD.bazel

I think I'm missing how to get vite-node to find the default rules_nodejs node toolchain to run.

I register the toolchain in Module.bazel and the default toolchain disapears

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant