Transitioning from webpack to Vue2.7 with @vitejs/plugin-vue2 has presented a challenge.
await import(`${path}/${config || 'config'}`).catch(e => ({default: {}}))).default
Previously, when the code above was executed, any missing imported file would be handled without displaying an error in the console.
However, after switching to vite, importing now triggers a Not Found error that is caught like this:
http://localhost:14400/src/User/config net::ERR_ABORTED 404 (Not Found)
Is there a way for vite to handle missing files without generating an error in the console?