A plugin to use Vite with Eleventy
eleventy-plugin-vite is a plugin that allows users to use Vite v4.0 with Eleventy v2.0. It enables running Vite as middleware in Eleventy’s Dev Server and also runs Vite build to postprocess the Eleventy build output. This plugin enhances the development experience by leveraging the benefits of Vite with Eleventy.
To install eleventy-plugin-vite, follow these steps:
npm install eleventy-plugin-vite
.eleventy.js):const vitePlugin = require("eleventy-plugin-vite");
module.exports = (eleventyConfig) => {
eleventyConfig.addPlugin(vitePlugin);
};
eleventy-plugin-vite is a powerful plugin that integrates Vite into Eleventy, enhancing the development and build process. With features like running Vite as middleware in Eleventy’s Dev Server and post-processing Eleventy build output with Vite, this plugin provides a seamless experience for developers. The related projects slinkity and vite-plugin-eleventy offer additional integrations and functionalities for those seeking more advanced features. However, it’s important to note the current limitations and TODOs, such as the inability to process serverless output with Vite. Overall, eleventy-plugin-vite is a valuable tool for optimizing Eleventy builds with Vite.