11ty / eleventy-plugin-vite

A plugin to use Vite with Eleventy
134 stars 10 forks source link

Throw a better error when the `output` folder in Eleventy matches Vite’s `publicDir` option #23

Open zachleat opened 1 year ago

zachleat commented 1 year ago

publicDir: "public" is a reserved Vite directory and Eleventy can’t use the same value for its output directory. We need a better error message here.

Found via @aarongoldenthal on this issue: https://github.com/11ty/eleventy-plugin-vite/issues/22#issuecomment-1407158803

Workaround is to change viteOptions.publicDir (via https://github.com/11ty/eleventy-plugin-vite#options) or to change Eleventy’s output directory.

SleeplessByte commented 12 months ago

This is not the reason #22 happens. With outputDir: dist, this still happens.