Next.js Discord

Discord Forum

import a ts type from app dir to component in pages

Unanswered
Lapland Longspur posted this in #help-forum
Open in Discord
Lapland LongspurOP
Half of our codebase has been migrated to rsc (app directory) from pages directory.

The other half will be migrated to rsc when there is capacity.


In the app directory somewhere I have a customer.types.ts file.

Im currently working on a page that is still in pages directory.

There I have a component that needs to import a type from customer.types.ts (which lives in the app directory) . 



This works and I am experiencing no issues. Just wanted to double check if this can cause any problems.

3 Replies