The production environment reports an error, but the development environment is normal.
error:
Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
vite.config.js is configured as follows
// Vue, etc. use cdn to load
rollupOptions: {
external: ['vue', 'vue-router'],
plugins: [
commonjs(),
externalGlobals({
vue: 'Vue',
'vue-router': 'VueRouter',
}),
],
},