I'm currently utilizing Nuxt 2 with TypeScript and the most up-to-date dependency versions available.
Even though my app is of medium size, the compilation time seems excessively slow.
Here are my PC specs: Ryzen 7 2700X (8 Cores/16 Threads) 16 GB DDR4 3000MHZ NVM-SSD
The client-compilation takes approximately 72 seconds, while the server-compilation takes around 55 seconds.
Below you can see excerpts from my package.json:
{
"name": "nuxt",
"version": "1.0.0",
"private": true,
// Dependencies list...
}
And here's a snippet from my Nuxt.config.js file:
// Import statements and configuration settings...
In addition, I have created a typescript module which includes various loader configurations for improved efficiency during the build process.
Upon running the build command with the --profile flag, it was evident that the ts-loader and vue-loader were significantly impacting the overall performance due to the high request count and time taken per request.
My project consists of approximately 44 .Vue components, all implemented in TypeScript, along with 13 .Vue pages.
If anyone has insights or suggestions on how to optimize the compilation speed, I would greatly appreciate your assistance.