Skip to content

How to share code (interfaces, enums, constants etc.) with other frontend apps? #4610

Closed Answered by MickL
MickL asked this question in Help
Discussion options

You must be logged in to vote

To answer my own question:

In the shared library tsconfig set target and module to ESNext and module resoltion to NodeNext. Now change all imports/exports to have .js extension.

Now imports work both in Adonis and in the frontend framework (Nuxt in my case).

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@MickL
Comment options

@thetutlage
Comment options

@MickL
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MickL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants