You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know why this happens and is expected behavior; webpack in brought in via external repository which has its own npm_link_all_packages which links hermetically downloaded webpack next to webpack bin. by design this node_modules folder is not visible to other repositories which would be yours in this case.
you need to also link the hermetically downloaded webpack into your package to successfully resolve the same version of webpack.
load("@webpack//:npm_link_all_packages.bzl", "npm_link_all_packages")
npm_link_all_packages(name = "node_modules")
webpack(
data = [":node_modules/webpack"]
)
What happened?
I'm trying to use a built-in webpack plugin, for example:
and I get one of two errors depending on whether I include webpack as a dependency in the configuration:
Version
Development (host) and target OS/architectures:
Output of
bazel --version
:Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:How to reproduce
Full repro workspace here of every variant I tried: https://github.com/titanous/rules_webpack_require_error
Any other information?
No response
Fund our work
The text was updated successfully, but these errors were encountered: