cipami / nuxt-lodash

Lodash module for Nuxt
MIT License
101 stars 10 forks source link

Many imports in dev #53

Open VitaliyInshakov opened 8 months ago

VitaliyInshakov commented 8 months ago

Version: 2.5.0 Nuxt: 3.6.0 Hi! I found closed issue about many imports in dev mode https://github.com/cipami/nuxt-lodash/issues/47 And it's still present in last version image

jo0707 commented 8 months ago

Same here, on Brave and Chrome, script loading always on pending status and Nuxt becomes unresponsive, even though it's not confirmed yet. In Firefox, all scripts can be loaded and Nuxt is responsive although it takes a long time to load.

miftahur-ridwan commented 6 months ago

Same here until now, using version: 2.5.3

Screenshot 2023-12-21 at 17 04 38
wokalek commented 6 months ago

Same here. Disposing of a hard drive like this is simply disgusting.

odranoelBR commented 6 months ago

Same here.

jo0707 commented 6 months ago

I found a temporary fix. Add "lodash-es" in vite.optimizeDeps in nuxt.config.ts file

nuxt.config.ts

export default defineNuxtConfig({
    modules: [...],
    // add this
    vite: {
       optimizeDeps: {
          include: ["lodash-es"],
       },
    },
})
wokalek commented 6 months ago

@jo0707 This really worked, thanks! But still this is a temporary solution.

@cipami I would recommend the author to look at how vueuse dependencies are imported. It uses import via a hook. Maybe this will solve the problem.

lizy0329-biubiubiu commented 1 month ago

As an official nuxt module, there shouldn't be this kind of performance issue