OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Choosing between CommonJS and ES modules

  • Thread starter Thread starter Henry
  • Start date Start date
H

Henry

Guest
There are apparently two main approaches to structuring apps that use TypeScript, namely CommonJS modules and ES modules. Based on many lines in the manual, this is a critical factor in how you write things and particularly how you import and export things like type aliases and interfaces which I expect to use.

Which approach should I be using to build my own apps? I'm building Vue 3 apps with Vuetify 3 and Pinia. I would strongly prefer to use whatever approach I'm most likely to find in teams building new apps, rather than those maintaining old code.

<p>There are apparently two main approaches to structuring apps that use TypeScript, namely CommonJS modules and ES modules. Based on many lines in the manual, this is a critical factor in how you write things and particularly how you import and export things like type aliases and interfaces which I expect to use.</p>
<p>Which approach should I be using to build my own apps? I'm building Vue 3 apps with Vuetify 3 and Pinia. I would strongly prefer to use whatever approach I'm most likely to find in teams building new apps, rather than those maintaining old code.</p>
 

Latest posts

M
Replies
0
Views
1
Mohit Pant
M
Top