We're currently working with a vanilla Vue/Vite setup and I'm encountering the error message
TypeError: Failed to fetch dynamically imported module
in Sentry logs.
It appears that these errors coincide with new deployments to production, but I don't have enough data to confirm this. The issue doesn't occur locally and only manifests in the deployed code.
I've come across similar questions related to React setups, but none of them provided a satisfactory solution.
There was also a similar query regarding dynamically imported svgs, although our errors pertain to entire components.
The usage of dynamically imported components is limited to our routing configuration:
export const router = createRouter({
history: routerHistory,
strict: true,
routes: [
{
path: '/',
name: routes.homepage.name,
component: () => import('@/views/Home.vue'),
children: [
{
path: '/overview',
name: routes.overview.name,
component: () => import('@/views/Overview.vue'),
},
// other similar routes
],
},
],
});
Our dependencies versions are as follows:
"vue": "^3.0.9",
"vue-router": "^4.0.5",
"vite": "^2.0.5",
Any suggestions or insights on how to troubleshoot and resolve this issue would be highly appreciated!