11ty / eleventy-plugin-vite

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

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

Closed zachleat closed 2 months 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 1 year ago

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

KiwiKilian commented 2 months ago

This was released with v5.0.0-alpha.4.