vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.75k stars 154 forks source link

Vite + Vue 3 dynamic import warning #286

Open gabrielpfl opened 2 years ago

gabrielpfl commented 2 years ago
[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
leifmarcus commented 2 years ago

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:

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

Pettor commented 2 years ago

Same issue when importing Vime in Storybook:

petertellgren commented 2 years ago

Same issue in React project:

Emuzex commented 2 years ago

Same issue in Vue project:

a-tonchev commented 2 years ago

Same here - Vite + Vime + React

marimendez88 commented 2 years ago

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"
Juice10 commented 1 year ago

Has anyone found a workaround for this?