
umi-preset-vite
I recently started working with umi-preset-vite for my project, and I've stumbled upon some nuances that are definitely worth sharing. The integration of vite with umi can substantially enhance your development experience, especially with its hot module replacement capabilities. However, there are a few setup steps and common issues that one should be mindful of to ensure a smooth development process.
One major highlight is the requirement to configure certain settings in your package.json to avoid runtime errors, particularly those related to vite commands. Additionally, understanding how to properly implement CSS modules and handle any dependencies such as less is crucial for maintaining your project's styling integrity.
"postinstall": "umi g tmp" in your package.json scripts to ensure necessary configurations are generated after installing dependencies.export default function () {} which can lead to issues if not structured correctly.yarn umi modifyViteCSSPlugin fails, re-running it until you see the success message is essential for correct CSS functionality.
Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects