4.0.0 • Published 1 year ago
@11ty/eleventy-plugin-vite v4.0.0
eleventy-plugin-vite 🕚⚡️🎈🐀
A plugin to use Vite v4.0 with Eleventy v2.0.
This plugin:
- Runs Vite as Middleware in Eleventy Dev Server (try with Eleventy’s
--incremental
) - Runs Vite build to postprocess your Eleventy build output
Related Projects
slinkity
by @Holben888: a much deeper and more comprehensive integration with Vite! Offers partial hydration and can use shortcodes to render framework components in Eleventy!vite-plugin-eleventy
by @Snugug: uses Eleventy as Middleware in Vite (instead of the post-processing approach used here)
Eleventy Housekeeping
- Please star Eleventy on GitHub!
- Follow us on Twitter @eleven_ty
- Support 11ty on Open Collective
- 11ty on npm
- 11ty on GitHub
Installation
npm install @11ty/eleventy-plugin-vite
const EleventyVitePlugin = require("@11ty/eleventy-plugin-vite");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(EleventyVitePlugin);
};
Options
View the full list of Vite Configuration options.
const EleventyVitePlugin = require("@11ty/eleventy-plugin-vite");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(EleventyVitePlugin, {
tempFolderName: ".11ty-vite", // Default name of the temp folder
// Defaults are shown:
viteOptions: {
clearScreen: false,
server: {
mode: "development",
middlewareMode: true,
},
build: {
mode: "production",
}
}
});
};
Limitations and TODOs
- TODO: While serverless routes can be used and rendered in the dev server, Vite cannot be used to process that output yet. Issue #1: Process Serverless Output with Vite.
4.0.0
1 year ago
2.0.0-canary.3
1 year ago
2.0.0
1 year ago
2.0.0-canary.2
2 years ago
1.0.0
2 years ago
1.0.0-canary.2
2 years ago
2.0.0-canary.1
2 years ago
1.0.0-canary.3
2 years ago
1.0.0-canary.1
2 years ago