Skip to content

amaralc/vite-dynamic-import

 
 

Repository files navigation

Repository demonstrating Vite Dynamic Module issue

vitejs/vite#11804

When running a project built in Vite you can hit:

TypeError: Failed to fetch dynamically imported module

This repository demonstrates it.

To reproduce:

  • npm install
  • npm run build

Then in 2 different terminals:

  • npx serve dist (starts a web server)
  • visit the page in your browser (usually localhost:3000)

Other terminal (within 10s of launching page):

  • modify the string in Foo.jsx
  • npm run build

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 61.7%
  • CSS 23.7%
  • JavaScript 9.8%
  • HTML 4.8%