Closed sentience closed 1 year ago
Hi @sentience, thanks for opening an issue. Right now the beta of eleventy@2.x.x
is not supported by this plugin but I'll be updating it accordingly once the v2 gets a release candidate version.
Turns out I was misusing eleventy-plugin-postcss
. I thought the plugin applied PostCSS to CSS files included in the build with addPassthroughCopy
, but actually it adds CSS files to Eleventy as a supported template format.
Having removed the conflicting addPassthroughCopy
from my Eleventy config, the plugin is working perfectly with Eleventy 2.0.0 beta.
Eleventy 2.0.0-beta.1 adds the
--ignore-initial
option to skip the initial full build when starting an Eleventy dev server. In this mode, with eleventy-plugin-postcss installed, the dev server copies source files configured withaddPassthroughCopy
without processing them with PostCSS.Reproduction steps:
npm i
npx @11ty/eleventy – note _site/assets/styles/main.css
contains TailwindCSS outputnpx @11ty/eleventy --ignore-initial --serve --incremental
– note _site/assets/styles/main.css is overwritten with the unprocessed source file, and the site's styles are brokenAlso reported as 11ty/eleventy#2761 as an undocumented breaking change in Eleventy 2.0.0-beta.1.