Open onlywei opened 1 month ago
Name | Link |
---|---|
Latest commit | 0067f7ee587ab5ce1fbc871efb02d938189f8fe3 |
Latest deploy log | https://app.netlify.com/sites/agitated-mahavira-26f8f9/deploys/66ce183a4d383300085eebf7 |
This is absolutely amazing, thank you @onlywei! I'll be reviewing shortly.
Addresses #155
Adds a new config option that needs a vite plugin to work.
By default,
@fastify/vite
looks up the Vite configuration options by importing Vite fromnode_modules
and then using its Node API to look up the vite.config file. This is often not desirable in production mode since many production builds declare Vite as adevDependency
and exclude it from their final container/docker images to save space.To support this kind of production build, this PR makes
@fastify/vite
ship with a Vite plugin that can save the handful of properties that it needs from the resolved Vite configuration object to a file in your dist directory. These properties can than be loaded instead of loading the config through vite itself.See the changes to the
docs/config/index.md
file for exactly what is happening in this change.Checklist
npm run test
andnpm run benchmark