chrome-extension-boilerplate-react-vite: TypeError: Failed to fetch dynamically imported module
I’m getting the following error when trying to inject some HTML via this chrome extension boilerplate:
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: chrome-extension://{my-extension-id}/assets/js/index.js
It only happens about 10% of the time, which is strange. I think it has something to do with the Vite configuration, although, it is difficult to debug with it only happening occasionally.
Might it have something to do with the customDynamicImport() function, or some other custom configuration of this boilerplate? Any help would be appreciated!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (9 by maintainers)
Commits related to this issue
- issue #157 (#195) — committed to Jonghakseo/chrome-extension-boilerplate-react-vite by Jonghakseo 9 months ago
I found customDynamicImport doesn’t work with await import, here is error:
and this will resolve my problem
modulePreload: falsein vite.config.tsbuildpart