|
| 1 | +diff --git a/node_modules/@11ty/eleventy-plugin-vite/.eleventy.js b/node_modules/@11ty/eleventy-plugin-vite/.eleventy.js |
| 2 | +index e5f7e93..82d9de1 100644 |
| 3 | +--- a/node_modules/@11ty/eleventy-plugin-vite/.eleventy.js |
| 4 | ++++ b/node_modules/@11ty/eleventy-plugin-vite/.eleventy.js |
| 5 | +@@ -17,9 +17,10 @@ module.exports = function(eleventyConfig, options = {}) { |
| 6 | + eleventyConfig.ignores.add(publicDir); |
| 7 | + |
| 8 | + // Use for-free passthrough copy on the public directory |
| 9 | +- let passthroughCopyObject = {}; |
| 10 | +- passthroughCopyObject[`${publicDir}/**`] = "/" |
| 11 | +- eleventyConfig.addPassthroughCopy(passthroughCopyObject); |
| 12 | ++ // let passthroughCopyObject = {}; |
| 13 | ++ // passthroughCopyObject[`${publicDir}/**`] = "/" |
| 14 | ++ // eleventyConfig.addPassthroughCopy(passthroughCopyObject); |
| 15 | ++ eleventyConfig.addPassthroughCopy(`${publicDir}/**`); |
| 16 | + |
| 17 | + // Add temp folder to the ignores |
| 18 | + eleventyConfig.ignores.add(eleventyVite.getIgnoreDirectory()); |
| 19 | +diff --git a/node_modules/@11ty/eleventy-plugin-vite/EleventyVite.js b/node_modules/@11ty/eleventy-plugin-vite/EleventyVite.js |
| 20 | +index 4c90855..8db76f7 100644 |
| 21 | +--- a/node_modules/@11ty/eleventy-plugin-vite/EleventyVite.js |
| 22 | ++++ b/node_modules/@11ty/eleventy-plugin-vite/EleventyVite.js |
| 23 | +@@ -46,9 +46,11 @@ class EleventyVite { |
| 24 | + try { |
| 25 | + let viteOptions = lodashMerge({}, this.options.viteOptions); |
| 26 | + viteOptions.root = tmp; |
| 27 | ++ let publicDir = path.join(this.outputDir, viteOptions.publicDir || "public", path.sep); |
| 28 | + |
| 29 | + viteOptions.build.rollupOptions.input = input |
| 30 | + .filter(entry => !!entry.outputPath) // filter out `false` serverless routes |
| 31 | ++ .filter(entry => !entry.outputPath.startsWith(publicDir)) // filter out files in public/, vite/rollup will not touch these files and just copy them to the root of your output folder |
| 32 | + .map(entry => { |
| 33 | + if(!entry.outputPath.startsWith(this.outputDir + path.sep)) { |
| 34 | + throw new Error(`Unexpected output path (was not in output directory ${this.outputDir}): ${entry.outputPath}`); |
0 commit comments