-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Description
🚀 Feature Proposal
Currently expect library is unusable with vite:
| 11:34:12 PM [vite] warning:
| ./.vite_generated/deps/expect.js
| 13064| try {
| 13065| const moduleUrl = (0, _url().pathToFileURL)(filePath);
| 13066| const importedModule = await import(moduleUrl.href);
| | ^
| 13067| if (!applyInteropRequireDefault) {
| 13068| return importedModule;
| 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: ./.vite_generated/deps/expect.js?v=bb9d55bc
Motivation
Both vite and expect are popular libraries. We use expect on our server side codebase, but can't on client side due to this issue.
Example
No response
Pitch
Because it's a fundamental limitation of expect codebase.