vite icon indicating copy to clipboard operation
vite copied to clipboard

_nuxt/empty.js was preloaded using link but not used within a few seconds

Open toniengelhardt opened this issue 4 years ago • 6 comments

For some reason my app tries to load _nuxt/empty.js when nuxt-vite is activated. This doesn't happen when the app is loaded without nuxt-vite activated.

Screen Shot 2021-10-02 at 16 44 08

When I create an empty empty.js file under _nuxt the error is gone.

Versions

nuxt-vite: 0.3.2 nuxt: 2.15.8

Reproduction

Load any page of the app.

Configuration:

vite: {
  optimizeDeps: {
    include: [
      'cookie'
    ],
  },
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `
          @import "@/assets/scss/_mixins.scss";
          @import "@/assets/scss/_variables.scss";
        `,
      },
    },
  },
},

// When I remove this, same result
buildDir: process.env.BUILD_DIR ? `${process.env.BUILD_DIR}/v${version}` : '.nuxt',

toniengelhardt avatar Oct 02 '21 15:10 toniengelhardt

Should be solved on 0.3.3

pi0 avatar Oct 02 '21 16:10 pi0

@pi0 it's still around with 0.3.3 unfortunately

toniengelhardt avatar Oct 02 '21 16:10 toniengelhardt

Would you please try on 0.3.4?

pi0 avatar Oct 02 '21 16:10 pi0

👌 The error is resolved.

I still get this warning though:

Screen Shot 2021-10-02 at 17 41 23

Is that a problem with a cache or something?

toniengelhardt avatar Oct 02 '21 16:10 toniengelhardt

That's an unrelated manifest issue caused by a workaround we used to have a placeholder entry but is not being actually used. You can ignore it for now. Will keep issue open until fixing :)

pi0 avatar Oct 02 '21 16:10 pi0

Amazing thanks 🙏🏽

toniengelhardt avatar Oct 02 '21 17:10 toniengelhardt