How to use a local external library in a Next.js app while developing? #61800
Unanswered
lancejpollard
asked this question in
Help
Replies: 1 comment 1 reply
-
I got it working by adding the dependency with as an absolute path and transpiling the package by Next.js. package.json
next.config.mjs
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
What is the approach to using a local external library (a TypeScript library which I'm developing concurrently) inside a Next.js app? How do you wire this up? I am using
pnpm
, can Ipnpm link
them, or do I need to symlink in a sort of way? What is the recommended approach?I tried pnpm linking with and without this in my next.config.js, but both result in a host of errors of "module not found".
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions