Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERRORS: Having trouble rendering/compiling css template + Browser queries must be an array or string. Got object. #6

Open
techbridgedev opened this issue Dec 5, 2023 · 0 comments

Comments

@techbridgedev
Copy link

techbridgedev commented Dec 5, 2023

Enabling the plugin via eleventyConfig.addPlugin(lightningCSS); in .eleventy.js produces the following error:

[11ty] 1. Having trouble rendering css template ./src/Box.css (via TemplateContentRenderError)
[11ty] 2. Having trouble compiling template ./src/Box.css (via TemplateContentCompileError)
[11ty] 3. Browser queries must be an array or string. Got object. (via BrowserslistError)
[11ty] 
[11ty] Original error stack trace: BrowserslistError: Browser queries must be an array or string. Got object.
[11ty]     at checkQueries (/projects/eleventy/node_modules/browserslist/index.js:387:11)
[11ty]     at browserslist (/projects/eleventy/node_modules/browserslist/index.js:398:3)
[11ty]     at Object.compile (/projects/eleventy/node_modules/@11tyrocks/eleventy-plugin-lightningcss/.eleventy.js:100:43)
[11ty]     at CustomEngine.compile (/projects/eleventy/node_modules/@11ty/eleventy/src/Engines/Custom.js:201:7)
[11ty] Wrote 0 files in 0.01 seconds (v2.0.1)

If I rename or delete Box.css I get the same error, but for the next CSS file in my project (/src/Center.css).

I'm configuring browserslist in my package.json, but I've also tried the default method and produced the same error.

Contents of .eleventy.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant