Reputation: 195
I want to know if it is normal that nuxt takes 2 or 3 seconds to make the hot reload changes? For example with Gatsby the Hot Reloads are instantaneous. I missed something?
Here is my nuxt build config:
build: {
parallel: true,
cache: true,
extractCSS: process.env.NODE_ENV === 'production',
optimizeCSS: process.env.NODE_ENV === 'production',
transpile: ['vue-intersect'],
},
Upvotes: 9
Views: 11493
Reputation: 11
I am happy to report that after manually importing about 300 components in approximately 40 pages for about 15 hours, the HMR (Hot Module Replacement) is slower. It has added approximately 100ms on an M1 computer and around 200-300ms on an Intel computer. Therefore, setting "components: false" does not make the hot reload faster.
Upvotes: 1
Reputation: 1760
I think your problem is because you have a property components setted as true.
When set to true or using an object, it will include the nuxt/components dependencies and auto import your components (defined in ~/components) when you use them in your templates.
...
// change to false, or remove this config.
components: true
...
Only set to true if you know why you need this property as true. So you can find more about this, in the Nuxt Docs https://nuxtjs.org/api/configuration-components and in the Github docs https://github.com/nuxt/components.
Upvotes: 11