martpie / next-transpile-modules

Next.js plugin to transpile code from node_modules. Please see: https://github.com/martpie/next-transpile-modules/issues/291
MIT License
1.13k stars 85 forks source link

How to include nested package when using pnpm? #298

Open linwu-hi opened 10 months ago

linwu-hi commented 10 months ago

Are you trying to transpile a local package or an npm package? If an npm package, which one?

ant-mobile

Describe the bug A clear and concise description of what the bug is (please include logs from your terminal with debug enabled).


const withTM = require('next-transpile-modules')(['antd-mobile']);

To Reproduce Steps to reproduce the behavior (a reproduction is even better):

ant-mobile includes the third-party package @react-spring/web, but next-transpile-modules did not find the correct package address under the management of the pnpm package, so it was not compiled, and Npm/Yarn would not

Expected behavior A clear and concise description of what you expected to happen.

Setup

Debug logs (optiona) If the bug is related to compilation issues, please include a debug log (cf. README).

Additional context Add any other context about the problem here.