
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
@11ty/eleventy-plugin-vue
Advanced tools

Zero bundle size server-rendered components for Vue.js.
Read more about the goals of this plugin (and a full tutorial!) at Eleventy and Vue, a match made to power Netlify.com
npm install @11ty/eleventy-plugin-vue
0.8.x is encouraged to use Eleventy 2.0.0 (and Node 14+)
0.7.x is encouraged to use Eleventy 1.0.0 (and Node 12+)
0.2.x is encouraged to use Eleventy 0.11.1 or newer (for incremental Vue component builds)
0.1.x requires Eleventy 0.11.0 or newer
0.0.x requires Eleventy 0.11.0 Beta 2 or above (0.11.0-beta.2)
Requires experimental features in Eleventy, specifically: Custom File Extension Handlers feature from Eleventy. Opt in to experimental features on Eleventy by running ELEVENTY_EXPERIMENTAL=true npx @11ty/eleventy.
0.3.0 (Milestone) More consistent incremental builds. Performance improvements.0.2.1 (Milestone) adds incremental builds for Eleventy Vue components to avoid unnecessary repeat work. Fixes bug with permalink strings returned from Vue Single File Component data.0.1.x converted to use a Single File Components for everything (templates, components, etc), instead of 0.0.x’s string templates with front matter.*.vue’s Single File Components, both in the input directory and in Eleventy’s includes directory. .vue files in the includes directory are available for import but only those outside of the includes directory result in output files.scoped CSS.methods (global functions to use in templates and child components).
url Universal Filter like url("/my-url/") in your Vue templates.page Eleventy supplied data is also available globally in all components.<!--vue-ssr-outlet-->) as layouts.
.vue templates as Eleventy layouts is not yet supported. Subscribe to this issue at #26.lang on <template>, <style>, or <script> is not yet supported.<!doctype html> to a Vue template is not supported by Vue. For this reason it is recommended to use a different template syntax for your layout (until Vue.js Page Templates support is added per the note above).Usually .eleventy.js:
const eleventyVue = require("@11ty/eleventy-plugin-vue");
module.exports = function(eleventyConfig) {
// Use Defaults
eleventyConfig.addPlugin(eleventyVue);
};
const eleventyVue = require("@11ty/eleventy-plugin-vue");
module.exports = function(eleventyConfig) {
// OR, Use your own options
eleventyConfig.addPlugin(eleventyVue, {
// Directory to store compiled Vue single file components
cacheDirectory: ".cache/vue/",
// Pass in a file or multiple .vue files to limit compilation
// If this is empty, the plugin will search for all *.vue files
input: [],
// Use postcss in the single file components
rollupPluginVueOptions: {
style: {
postcssPlugins: [
require("autoprefixer"),
require("postcss-nested")
]
}
}
// Passed to rollup.rollup
rollupOptions: {
// Declare your own external dependencies
external: [],
// Use your own Rollup plugins
plugins: [],
},
});
};
For a full list of rollupPluginVueOptions, see rollup-plugin-vue’s Options.
eleventy-assetsCompatible with @11ty/eleventy-plugin-vue 0.0.5 and newer.
Eleventy’s Assets plugin lets you manage your own Inline CSS or JavaScript. For the first version of the Eleventy Vue plugin, you can reuse an existing CSS code manager from eleventy-assets add CSS from your Vue.js Single File Components too.
const eleventyVue = require("@11ty/eleventy-plugin-vue");
const { InlineCodeManager } = require("@11ty/eleventy-assets");
module.exports = function(eleventyConfig) {
let myCssManager = new InlineCodeManager();
eleventyConfig.addPlugin(eleventyVue, {
// Re-use an existing `eleventy-assets` Manager
assets: {
css: myCssManager
}
});
};
Available with Eleventy 1.0+ and Eleventy Vue Plugin 0.6+
Use serverPrefetch to tell the component to do a few async things before it renders the component.
Below is an example of a Vue template that uses the Eleventy Render Plugin to render Markdown (either in an external file or a string).
<template>
<header v-html="content"/>
</template>
<script>
export default {
async serverPrefetch() {
// let content = await this.renderFile("./_includes/blogpost.md", "md");
this.content = await this.renderTemplate("# Title", "md");
}
}
</script>
FAQs
Use Vue.js single file components in Eleventy.
The npm package @11ty/eleventy-plugin-vue receives a total of 198 weekly downloads. As such, @11ty/eleventy-plugin-vue popularity was classified as not popular.
We found that @11ty/eleventy-plugin-vue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.