You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Eleventy is configured with an addPassthroughCopy, but the file has not yet been created when the initial Dev Server build occurs, Eleventy Dev Server ignores the file when it is created and fails to copy/serve it.
This presents a problem when using a separate process (e.g. postcss-cli) to generate files in development that need to be live-reloaded by Eleventy Dev Server. If the separate process doesn't start up quickly enough and generate its initial output before Eleventy Dev Server first looks for source files, the generated files are ignored.
Wait 5 seconds for the initial PostCSS build to complete.
Visit http://localhost:8080/ and note the text "This is a test." appears without the blue background color specified in the styles/styles.css file.
Stop the Dev Server with Ctrl-C.
npm start
Wait 5 seconds for the initial PostCSS build to complete.
Visit http://localhost:8080/ and this time note that the styles display correctly, because _tmp/styles.css already exists from the previous Dev Server run.
Expected behavior
Eleventy Dev Server should monitor for the creation of the source file specified in the addPassthroughCopy (_tmp/styles.css) if it doesn't exist at first. As soon as the file is created, Eleventy Dev Server should serve it when requested.
Operating system
macOS Ventura 13.4.1 (c)
Eleventy
2.0.1
Describe the bug
When Eleventy is configured with an
addPassthroughCopy
, but the file has not yet been created when the initial Dev Server build occurs, Eleventy Dev Server ignores the file when it is created and fails to copy/serve it.This presents a problem when using a separate process (e.g. postcss-cli) to generate files in development that need to be live-reloaded by Eleventy Dev Server. If the separate process doesn't start up quickly enough and generate its initial output before Eleventy Dev Server first looks for source files, the generated files are ignored.
Reproduction steps
npm i
npm start
npm start
Expected behavior
Eleventy Dev Server should monitor for the creation of the source file specified in the
addPassthroughCopy
(_tmp/styles.css) if it doesn't exist at first. As soon as the file is created, Eleventy Dev Server should serve it when requested.Reproduction URL
https://github.com/sentience/eleventy-postcss-issue-demo
Screenshots
No response
The text was updated successfully, but these errors were encountered: