{"_id":"@eleventy-plugin-themer/build-vite","_rev":"7-1c5c7bb1a549d06cb63f1cd8690c05b4","name":"@eleventy-plugin-themer/build-vite","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"@eleventy-plugin-themer/build-vite","version":"0.1.0","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"author":{"name":"Artis Lismanis"},"license":"MIT","_id":"@eleventy-plugin-themer/build-vite@0.1.0","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"cf2c0a5ff659088c97709ca20408592a3a9bbb3e","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.1.0.tgz","fileCount":22,"integrity":"sha512-yrSpU58+HY1I4Nc8lqGbFD2XKtVgsbqxMp3Ddlj1qau9B9sXKyAHtjyRPbZkSRb66yxbZdKZgYGgfcMjAKf0KQ==","signatures":[{"sig":"MEUCIHu7gzbG66mPYBli/NLFxb7B8koaa8RIJKLQFsr6AzswAiEAv3Wgk/oKMwMYU5etBYYWRzSJ1VJ9e0wxXJrl9947Ma0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69112},"main":"index.mjs","type":"module","engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"ca19d933936453a503e5cd1aba78acea7dcb8696","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"artislismanis","email":"artis@lismanis.uk"},"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"10.9.8","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"_nodeVersion":"22.22.3","dependencies":{"glob":"^13.0.0","critters":"^0.0.24","purgecss":"^6.0.0","node-html-parser":"^7.0.1","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0","@11ty/eleventy-plugin-vite":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/build-vite_0.1.0_1781953227643_0.7815921794185832","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@eleventy-plugin-themer/build-vite","version":"0.3.0","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"author":{"name":"Artis Lismanis"},"license":"MIT","_id":"@eleventy-plugin-themer/build-vite@0.3.0","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"c4c5711741fda0cbd719200d7c0d68d8dbff13cf","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.3.0.tgz","fileCount":22,"integrity":"sha512-IWOnDbscd6F5L7Y4w35Yx0N0W5zBGxw8uRjp5QW2XJDsVToIIvToktnwZGdFTfxz99Yi5OszTY4PoO4nnOuZ5g==","signatures":[{"sig":"MEUCIQDBWy4XGop5KCzaEjaEHoguIO8H+0wjOZhPy9RuEewxngIgcvZiCWPZPBWtS9efvpjkcLo8b/nFEQ8lgIs2r8Omg+A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69512},"main":"index.mjs","type":"module","engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"6553b8cbbbed9302d10dce8a2710153d7a77e3f2","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"artislismanis","email":"artis@lismanis.uk"},"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"10.9.8","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"_nodeVersion":"22.22.3","dependencies":{"glob":"^13.0.0","critters":"^0.0.24","purgecss":"^6.0.0","node-html-parser":"^7.0.1","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0","@11ty/eleventy-plugin-vite":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/build-vite_0.3.0_1782036257341_0.6638770752022507","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@eleventy-plugin-themer/build-vite","version":"0.4.0","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"author":{"name":"Artis Lismanis"},"license":"MIT","_id":"@eleventy-plugin-themer/build-vite@0.4.0","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"854a0ac434741467344cecb9424f475d385a8416","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.4.0.tgz","fileCount":22,"integrity":"sha512-rPDnEAIewD4bhzmLfPqoBRRLxhtldjTlOggLLH9ApVFS0JoEWSAO5xL6NCl2T8b2uGczS3xATxQ7P3cE18JnVw==","signatures":[{"sig":"MEQCICD2fNI7AF6axfAVJDlZ9OctFmf6nBKogaJu7NE1phHRAiAhp9NNrqR/E7kpPMqEtVjk+tZ4A+xRjpPMPRYB/8X7SQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69512},"main":"index.mjs","type":"module","engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"bcc252ea28916abc6fb22670b6de7463adf42673","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"artislismanis","email":"artis@lismanis.uk"},"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"10.9.8","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"_nodeVersion":"22.22.3","dependencies":{"glob":"^13.0.0","critters":"^0.0.24","purgecss":"^6.0.0","node-html-parser":"^7.0.1","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0","@11ty/eleventy-plugin-vite":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/build-vite_0.4.0_1782058955313_0.5354271550594607","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@eleventy-plugin-themer/build-vite","version":"0.4.1","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"author":{"name":"Artis Lismanis"},"license":"MIT","_id":"@eleventy-plugin-themer/build-vite@0.4.1","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"c557c05006eb9158b7bc9d77b9a1db9c9c5d621c","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.4.1.tgz","fileCount":22,"integrity":"sha512-TXpLx/DryHDrlJli/CYAgKnh5EJxhGsA5NMtP1ril6iQStXj7iBmioRlLiu3ve8XLo/4N9kUlDaKXbgzwuj1Tw==","signatures":[{"sig":"MEUCIA6EhBpN5SukGU7aV2jxBS5zUYIchYoGhupcBHNPP2c+AiEA7HV/ZGCVIVAIB+SGI0CcE7c8bFVCKAskz9KDbsDC5tQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69543},"main":"index.mjs","type":"module","engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"a3f37ecbd7e178087c87a1614abf4e3f15c7dd06","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"artislismanis","email":"artis@lismanis.uk"},"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"10.9.8","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"_nodeVersion":"22.22.3","dependencies":{"glob":"^13.0.0","beasties":"^0.4.2","purgecss":"^6.0.0","node-html-parser":"^7.0.1","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0","@11ty/eleventy-plugin-vite":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/build-vite_0.4.1_1782060865377_0.4504780595089686","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"@eleventy-plugin-themer/build-vite","version":"0.4.3","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"author":{"name":"Artis Lismanis"},"license":"MIT","_id":"@eleventy-plugin-themer/build-vite@0.4.3","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"b8ee95f27c4e5eadcbbd2625244ac142fb1233b9","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.4.3.tgz","fileCount":22,"integrity":"sha512-rc6AdPzVqm+Q5i5In1UAq3A3qDGLa29uB7F0HBeyyPU7TOLfeU2+Gr01E+ME0xPHW+KA4qbon6DdD8qtfKyHpw==","signatures":[{"sig":"MEUCIEGvwDdDTKUdsIAXPPYux01puSXD0R9UKTg0SzAAwCOYAiEA5NkNZQO87iMQO0R1WgLDH8ASWwy5hizOuR9hzXaBCjw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69789},"main":"index.mjs","type":"module","engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"a91eefdfd604b0979d6f9c9e9093b9260141dc57","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"artislismanis","email":"artis@lismanis.uk"},"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"10.9.8","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"_nodeVersion":"22.23.1","dependencies":{"glob":"^13.0.0","beasties":"^0.4.2","purgecss":"^6.0.0","node-html-parser":"^7.0.1","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0","@11ty/eleventy-plugin-vite":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/build-vite_0.4.3_1783273809326_0.6126504741867591","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@eleventy-plugin-themer/build-vite","version":"0.5.0","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"author":{"name":"Artis Lismanis"},"license":"MIT","_id":"@eleventy-plugin-themer/build-vite@0.5.0","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"bb04f9682fd1da45ff0a359dc84562366c821a18","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.5.0.tgz","fileCount":22,"integrity":"sha512-48bkmWnKYFjFT3BaaZZE1OSVJIQQ5CAj49b5B1nf+wz1FoW5D5RQlExXwKa12KJRaTNRxFyb7fb1f/mlmxawYg==","signatures":[{"sig":"MEUCIQDFurLW3/3zYqquw6o6fNyPSKebyv9IfgQeMurI7PSNQgIgZA4vz8gYAwG883eb4vS+TgvWjPIFPAgT2kwMB5/gcUc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eleventy-plugin-themer%2fbuild-vite@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":69793},"main":"index.mjs","type":"module","engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"f0fb617f05818d1888b0515af6ff461d51837e05","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"_npmUser":{"name":"artislismanis","email":"artis@lismanis.uk"},"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"11.16.0","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"_nodeVersion":"24.18.0","dependencies":{"glob":"^13.0.6","beasties":"^0.4.3","purgecss":"^6.0.0","node-html-parser":"^7.0.1","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.4.3"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0","@11ty/eleventy-plugin-vite":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/build-vite_0.5.0_1785713224493_0.8165801730451165","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"_id":"@eleventy-plugin-themer/build-vite@0.5.1","bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"dist":{"shasum":"d4d8a31eb0fefc4e194298f4a22e58cba9bb30b4","tarball":"https://registry.npmjs.org/@eleventy-plugin-themer/build-vite/-/build-vite-0.5.1.tgz","fileCount":22,"integrity":"sha512-mqfkN4G+vHdjoLKi424lAAFiegGFVWquXmhyylFSm2+FsdD74UTWL5A0sKQvtStq3CVuDGpmyD4KTAb3cL7DFQ==","signatures":[{"sig":"MEQCIB2KYk/qt+noOMYL9bh0sD0fJwEJXU8Lt6WUqn/sJF27AiBWSG/vQMWdUFUr5sedWI3BdcgDGrUaaWWkyJsMGV1BIw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEElauhfemvZGXmQq3UDzjujkdZZKQeU4A5t7mxd16fHAiEAwB4ydVcfCoKDBJLCh1WVKAbO/0PK6EhGdH19jqt07bU="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eleventy-plugin-themer%2fbuild-vite@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":69793},"main":"index.mjs","name":"@eleventy-plugin-themer/build-vite","type":"module","author":{"name":"Artis Lismanis"},"engines":{"node":">=22"},"exports":{".":"./index.mjs","./postcss":"./postcss.mjs"},"gitHead":"ebacf6fe6076746447f82cf3ddefea56c9947acb","license":"MIT","scripts":{"lint":"eslint .","test":"vitest run","test:watch":"vitest"},"version":"0.5.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:19471083-09e0-4701-8413-d90b68e8d525"}},"homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"_npmVersion":"11.19.0","description":"Opinionated Vite integration with production optimizations for Eleventy themes","directories":{},"maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"_nodeVersion":"24.20.0","dependencies":{"glob":"^13.0.6","beasties":"^0.5.4","purgecss":"^8.0.0","node-html-parser":"^9.0.4","html-minifier-terser":"^7.2.0","@eleventy-plugin-themer/core":"^0.5.1"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"peerDependencies":{"vite":"^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0","@11ty/eleventy-plugin-vite":"^7.0.0 || ^8.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/build-vite_0.5.1_1789850860888_0.4500290985044906"}}},"time":{"created":"2026-06-20T11:00:27.545Z","modified":"2026-09-19T20:47:41.327Z","0.1.0":"2026-06-20T11:00:27.780Z","0.3.0":"2026-06-21T10:04:17.473Z","0.4.0":"2026-06-21T16:22:35.457Z","0.4.1":"2026-06-21T16:54:25.505Z","0.4.3":"2026-07-05T17:50:09.520Z","0.5.0":"2026-08-02T23:27:04.678Z","0.5.1":"2026-09-19T20:47:40.976Z"},"bugs":{"url":"https://github.com/artislismanis/eleventy-plugin-themer/issues"},"author":{"name":"Artis Lismanis"},"license":"MIT","homepage":"https://github.com/artislismanis/eleventy-plugin-themer/tree/main/packages/build/vite#readme","keywords":["eleventy","eleventy-theme","vite","production-optimization","purgecss","critical-css","html-minification"],"repository":{"url":"git+https://github.com/artislismanis/eleventy-plugin-themer.git","type":"git","directory":"packages/build/vite"},"description":"Opinionated Vite integration with production optimizations for Eleventy themes","maintainers":[{"name":"artislismanis","email":"artis@lismanis.uk"}],"readme":"# @eleventy-plugin-themer/build-vite\n\nVite integration with production optimizations for Eleventy themes built with `@eleventy-plugin-themer/core`.\n\n## Features\n\n- **Auto-Import** - Automatically imports theme styles and scripts into user entry points\n- **Feature Discovery** - Discovers and bundles theme features as Vite entry points\n- **PurgeCSS** - Removes unused CSS from production builds\n- **Critical CSS** - Inlines critical CSS and async loads the rest (via Critters)\n- **HTML Minification** - Minifies HTML output\n- **Link Validation** - Validates internal links and images after build\n- **Non-HTML Preservation** - Preserves files like RSS feeds and sitemaps\n- **Dev Server** - Serves feature scripts during development with HMR\n\n## Installation\n\n```bash\nnpm install -D @eleventy-plugin-themer/build-vite @11ty/eleventy-plugin-vite\n```\n\nOptional peer dependencies (install based on optimizations you enable):\n\n```bash\nnpm install -D purgecss critters html-minifier-terser node-html-parser glob\n```\n\n## Usage\n\n```js\n// eleventy.config.mjs\nimport { eleventyPluginThemer } from '@eleventy-plugin-themer/core';\nimport { eleventyPluginThemerVite } from '@eleventy-plugin-themer/build-vite';\n\nconst THEME_NAME = '@eleventy-plugin-themer/theme-base';\n\nexport default async function (eleventyConfig) {\n  const __dirname = path.dirname(fileURLToPath(import.meta.url));\n\n  // Register core theme plugin (direct call so we can spread `dir` into the return value)\n  const { dir } = await eleventyPluginThemer(eleventyConfig, {\n    theme: THEME_NAME,\n    projectRoot: __dirname,\n    input: 'content',\n    output: '_site',\n  });\n\n  // Register Vite plugin with optimizations\n  await eleventyPluginThemerVite(eleventyConfig, {\n    theme: THEME_NAME,\n    projectRoot: __dirname,\n    optimizations: {\n      purgeCSS: true,\n      criticalCSS: true,\n      minifyHTML: true,\n      validateLinks: true,\n      preserveNonHtml: {\n        extensions: ['xml', 'txt', 'xsl'],\n      },\n    },\n  });\n\n  return { dir };\n}\n```\n\n## API\n\n### `eleventyPluginThemerVite(eleventyConfig, options)`\n\nEleventy plugin that wraps `@11ty/eleventy-plugin-vite` with theme-aware configuration.\n\n**Options:**\n\n- `theme` (string, required) - Theme package name\n- `projectRoot` (string, required) - Project root path\n- `scriptsEntry` (string) - Main scripts entry point (default: `'overrides/scripts/main.js'`)\n- `tempFolderName` (string) - Vite temp folder name (default: `'.11ty-vite'`)\n- `overridePaths` (Object) - Override paths configuration\n- `viteOptions` (Object) - Additional Vite options to merge with theme defaults\n- `optimizations` (Object) - Production optimization toggles:\n  - `purgeCSS` (boolean | Object) - Remove unused CSS\n  - `criticalCSS` (boolean | Object) - Inline critical CSS\n  - `minifyHTML` (boolean | Object) - Minify HTML output\n  - `validateLinks` (boolean | Object) - Validate internal links\n  - `preserveNonHtml` (Object) - Preserve non-HTML files. Provide `{ extensions: ['xml', 'txt'] }`\n\n### How `optimizations` merges with `theme.json#build`\n\nA theme can declare build hints in its `theme.json` under `build.*` (currently `build.purgeCSS` and `build.postcss`). These are merged with the consumer's `optimizations` config at plugin init by `mergeThemeBuildHints`:\n\n- **Arrays** (e.g. `purgeCSS.safelist.standard`, `safelist.deep`, `safelist.greedy`): theme entries come **first**, user entries **append** (deduped). Theme entries cannot be silently shadowed by a user typo, and greedy patterns the theme relies on stay at the head of the array.\n- **Objects** (non-array): user values **win** (last-spread). Setting `purgeCSS: true` enables the optimisation with the theme's hints; passing `purgeCSS: { safelist: {...} }` extends them per the array rule above.\n- **Booleans / primitives**: user value replaces.\n- **PostCSS plugins** (`build.postcss.plugins`) follow the same rule: theme-declared plugins run first, user-supplied plugins append. Override a theme plugin by re-declaring an entry with the same `package` name in your project's `postcss.config.mjs`.\n\nDisabling a theme-provided optimisation entirely: set the toggle to `false` in `optimizations` (e.g. `purgeCSS: false`).\n\n### `getFeatureEntries(projectRoot, themeMetadata, opts?)`\n\nReturns Vite entry points for the main script and all discovered features. Used internally by `eleventyPluginThemerVite`, but available for advanced use cases.\n\n```js\nimport { getFeatureEntries } from '@eleventy-plugin-themer/build-vite';\nimport { metadata } from '@eleventy-plugin-themer/theme-base';\n\nconst input = getFeatureEntries(__dirname, metadata, {\n  resolvedOverridePaths, // optional; auto-resolved if absent\n  discoveredFeatures, // optional Map; avoids redundant FS scan\n});\n```\n\nIf you've already called `getAvailableFeatures()` at plugin init, pass the resulting Map as `opts.discoveredFeatures` to skip a duplicate filesystem scan.\n\n### Individual Plugins\n\nOptimization plugins can be imported individually for custom build pipelines:\n\n```js\nimport {\n  purgeCSSFiles,\n  generateCriticalCSS,\n  minifyHTML,\n  validateLinks,\n  preserveNonHtmlFiles,\n} from '@eleventy-plugin-themer/build-vite';\n```\n\nAll follow the signature `(outputDir, options) => Promise<void>` and throw on failure.\n\n## Integration check\n\n`eleventyPluginThemerVite` runs a one-shot sanity check at plugin init that compares your environment against the package's declared peer ranges:\n\n- Node version vs `engines.node` (>=22)\n- `vite` peer version vs the supported major(s)\n- `@11ty/eleventy-plugin-vite` peer version vs the supported major(s)\n\nOn a healthy environment you'll see one line on startup:\n\n```text\n[themer/build-vite 0.1.0] integration check: OK\n```\n\nOn mismatch you get actionable warnings. The check **never throws** — a corrupt manifest or unreadable peer is logged and skipped so it can't take down your build. Opt out with `skipIntegrationCheck: true` if you're running a custom build flow.\n\n## Logging\n\nSet `THEME_LOG_LEVEL` environment variable to control output verbosity:\n\n```bash\nTHEME_LOG_LEVEL=silent npx eleventy  # No theme output\nTHEME_LOG_LEVEL=error npx eleventy   # Errors only\nTHEME_LOG_LEVEL=warn npx eleventy    # Errors + warnings\nTHEME_LOG_LEVEL=info npx eleventy    # Default\nTHEME_LOG_LEVEL=debug npx eleventy   # Verbose\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}