Vite options should now be set directly in the regular Vite config file: vite.config.js/.ts.
vite.config.js
.ts
Put this in your vite.config file
vite.config
ssr:{ noExternal: ['chart.js'] }