Last active
January 22, 2022 08:37
-
-
Save mr-pascal/9b564c2164f81a6c8680dc1377a22ce0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| workspace( | |
| name = "my_workspace", | |
| # Bazel should manage the "node_modules" directory | |
| managed_directories = {"@npm": ["node_modules"]}, | |
| ) | |
| // ... | |
| load("@build_bazel_rules_nodejs//:index.bzl", "npm_install") | |
| npm_install( | |
| # Name this npm so that Bazel Label references look like @npm//package | |
| name = "npm", | |
| # Paths to the package*.json files | |
| package_json = "//:package.json", | |
| package_lock_json = "//:package-lock.json", | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment