Import components from outside of Nextjs application folder.
Unanswered
Giant Angora posted this in #help-forum
Giant AngoraOP
Hi guys i need to import components from outside of Nextjs folder, how can i achive that?
Right now i added this to my tsconfig.json
I also added a paths shortcut
But i keep getting this error when trying to import a component.
Even if i use full path i keep getting this error.
BTW, i can't move the webpack folder to inside the nextjs folder.
Right now i added this to my tsconfig.json
include:[
..., //others things
"../webpack/assets/js/components/**/*.tsx"
]I also added a paths shortcut
"paths":{
"@/webpack/": ["../webpack/assets/js/components/"],
}But i keep getting this error when trying to import a component.
Module not found: Can't resolve '@/webpack/search_bar'Even if i use full path i keep getting this error.
BTW, i can't move the webpack folder to inside the nextjs folder.