Include JS and CSS files external to the main NextJS directory #14348
-
Hi, I have been looking for the solution for hours, but couldn't find any. I am not trying to include another module, but just files. They are JS (React/JSX) and CSS files. I have a repository that looks like this:
If I try to use the files in /common from /nextjs, I get this kind of errors: You may need an appropriate loader to handle this file type [...]. But of course, that was expected. I would like to avoid creating a npm module for common (I would need to use link, and suddenly I know new issues would pop up). I really would like to keep things as simple as possible. Thanks a lot for your ideas and help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Unfortunately not. All files you want transpiled/bundled must be included in your project folder. Otherwise as you mentioned you could go down the road of something like the with-yarn-workspaces example where you have multiple packages linked. |
Beta Was this translation helpful? Give feedback.
Unfortunately not. All files you want transpiled/bundled must be included in your project folder. Otherwise as you mentioned you could go down the road of something like the with-yarn-workspaces example where you have multiple packages linked.