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 am migrating my vue project to bazel and rules_js.
I used @vue/[email protected] which transitively uses plugins such as @vue/cli-plugin-babel, but without declaring it in dependencies. So I plan to use public_hoist_packages to make @vue/cli-service aware of @vue/cli-plugin-babel.
But the public_hoist_packages field did not hoist @vue/cli-plugin-babel in bazel-bin/node_modules.
Based on docs, public_hoist_packages will do the same thing as public-hoist-pattern in pnpm. I also tried bazelbuild/examples/frontend and didn't see changes in bazel-bin/node_modules either.
Version
Development (host) and target OS/architectures: x86_64 GNU/Linux ubuntu focal
Output of bazel --version: bazel 7.0.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file: rules_js version is 1.34.1
How to reproduce
I built all targets in bazelbuild/examples/frontend and didn't see hoisting in bazel-bin/node_modules
I tried pnpm i with public_hoist_pattern which did the hoisting in node_modules directory.
tusen@desk-0181:~/examples/frontend$ pnpm i
Scope: all 7 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1.6s
tusen@desk-0181:~/examples/frontend$ ls node_modules/
@next eslint-import-resolver-typescript eslint-plugin-jsx-a11y eslint-utils
eslint eslint-module-utils eslint-plugin-react eslint-visitor-keys
eslint-config-next eslint-plugin-flowtype eslint-plugin-react-hooks jsdom
eslint-config-react-app eslint-plugin-import eslint-plugin-testing-library vitest
eslint-import-resolver-node eslint-plugin-jest eslint-scope
tusen@desk-0181:~/examples/frontend$ cat .npmrc
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules). See# https://github.com/aspect-build/rules_js/blob/7377f2d0387cc2a9251137929b1c53ccdb3fbcf0/docs/npm_import.md#npm_translate_lock# documentation for more information.
hoist=false
public-hoist-pattern[]=@next/eslint-plugin-next*
public-hoist-pattern[]=eslint*
The text was updated successfully, but these errors were encountered:
Hi just got the same issue in #1884 and I notice that you need to reference the hoisted dependency in root package instead of that in sub package. e.g. //:node_modules/@vue/cli-plugin-babel instead of //my-vue-project:node_modules/@vue/cli-plugin-babel.
Note: No need to install @vue/cli-plugin-babel to root package.
What happened?
I am migrating my vue project to
bazel
andrules_js
.I used
@vue/[email protected]
which transitively uses plugins such as@vue/cli-plugin-babel
, but without declaring it independencies
. So I plan to usepublic_hoist_packages
to make@vue/cli-service
aware of@vue/cli-plugin-babel
.But the
public_hoist_packages
field did not hoist@vue/cli-plugin-babel
inbazel-bin/node_modules
.Based on docs,
public_hoist_packages
will do the same thing aspublic-hoist-pattern
inpnpm
. I also tried bazelbuild/examples/frontend and didn't see changes inbazel-bin/node_modules
either.Version
Development (host) and target OS/architectures:
x86_64 GNU/Linux ubuntu focal
Output of
bazel --version
:bazel 7.0.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:rules_js
version is1.34.1
How to reproduce
I built all targets in
bazelbuild/examples/frontend
and didn't see hoisting inbazel-bin/node_modules
I tried
pnpm i
withpublic_hoist_pattern
which did the hoisting innode_modules
directory.The text was updated successfully, but these errors were encountered: