Failed to resolve babel plugin/preset paths with pnpm #700
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
bundler: rollup 🗞️
Issue is related to rollup bundler
bundler: webpack 📦
Issue is related to webpack bundler
needs: complete repro 🖥️
Issue need to have complete repro provided
Environment
Description
When using pnpm as package manager and referencing another styled component in style, babel throws an error:
@babel/plugin-transform-runtime
is a dependency of Linaria but not the app so this error seems fair. Either providing a full path or changingdirname
to Linaria's may fix the problem.I tried to replace babel plugin/preset name string in
node_modules/linaria/lib/babel/evaluators/shaker/index.js
with the resolved path byrequire.resolve
and it worked:Reproducible Demo
https://github.com/buffaybu/linaria-resolve-demo
The text was updated successfully, but these errors were encountered: