vime icon indicating copy to clipboard operation
vime copied to clipboard

Vite + Vue 3 dynamic import warning

Open gabrielpfl opened this issue 3 years ago • 7 comments

[vite] warning: 
/node_modules/.vite/@vime_vue-next.js
1818|      return module[exportName];
1819|    }
1820|    return import(
   |                  ^
1821|      /* webpackInclude: /\.entry\.js$/ */
1822|      /* webpackExclude: /\.system\.entry\.js$/ */
The above dynamic import cannot be analyzed by vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.

  Plugin: vite:import-analysis
  File: /node_modules/.vite/@vime_vue-next.js?v=b7110c21

gabrielpfl avatar Feb 11 '22 19:02 gabrielpfl

I have the same issue with some imported packages. It seems to be related to files that are build with Stencil.js. I have the exact same error from another library.

Using the following versions:

  • Vite: 2.8.4
  • Vue: 3.2.31
  • @stencil/core: 2.9.0 (is used inside the library)

I tried to exclude the library via the config optimizeDeps.exclude, but that didn’t work.

leifmarcus avatar Feb 23 '22 10:02 leifmarcus

Same issue when importing Vime in Storybook:

  • Vite: 2.7.2
  • Vime: 5.3.1

Pettor avatar Feb 24 '22 10:02 Pettor

Same issue in React project:

  • Vite: 2.8.6
  • Vime: 5.3.1

petertellgren avatar Mar 11 '22 14:03 petertellgren

Same issue in Vue project:

  • "@vime/core": "^5.3.1",
  • "@vime/vue-next": "^5.3.1",
  • "vite": "^2.7.10"
  • "vue": "^3.2.26"

Emuzex avatar Mar 15 '22 23:03 Emuzex

Same here - Vite + Vime + React

a-tonchev avatar May 03 '22 10:05 a-tonchev

Same here in a vue project:

"vite": "^2.9.5",
"@ionic/vue": "^6.1.6",
"@ionic/vue-router": "^6.1.6",
"vue": "^3.2.33",
"vue-router": "^4.0.14"

marimendez88 avatar May 25 '22 22:05 marimendez88

Has anyone found a workaround for this?

Juice10 avatar Jul 03 '23 20:07 Juice10