Open edwardbrowncross opened 9 months ago
Good catch, will release a patch later today after work.
@galvez Any updates on this? I had to change my vitest config from .ts
to .mjs
in lieue of this issue being resolved.
Hey — I'll find some time tonight to get this sorted out and push a new release.
Prerequisites
Fastify version
4.26.0
Plugin version
6.0.5
Node.js version
18.19.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
20.04
Description
If the
vite.config
file has amts
file extension (vite.config.mts
), which is a file extension Vite suggests in its documentation, callingserver.vite.ready()
throws an error similar to the following:This is as a result of
'mts'
not appearing in this array: https://github.com/fastify/fastify-vite/blob/dev/packages/fastify-vite/config.js#L200Steps to Reproduce
Change the file extension of your
vite.config
file to.mts
Expected Behavior
I expect the Vite config file to be detected, as Vite itself can detect it.