eleventy-plus-vite icon indicating copy to clipboard operation
eleventy-plus-vite copied to clipboard

CssSyntaxError: /assets/css/main.499de48c.css:1:1: Unknown word

Open simplerethink opened this issue 2 years ago • 1 comments

When I run npm run build

My output is this:

../_site/assets/css/main.30ce0f88.css              22.97 KiB / gzip: 22.81 KiB
CssSyntaxError: /assets/css/main.499de48c.css:1:1: Unknown word
    at Input.error (/node_modules/postcss/lib/input.js:148:16)
    at Parser.unknownWord (/node_modules/postcss/lib/parser.js:540:22)
    at Parser.other (/node_modules/postcss/lib/parser.js:164:12)
    at Parser.parse (/node_modules/postcss/lib/parser.js:72:16)
    at parse (/node_modules/postcss/lib/parse.js:11:12)
    at new LazyResult (/node_modules/postcss/lib/lazy-result.js:133:16)
    at Processor.process (/node_modules/postcss/lib/processor.js:28:14)
    at rebaseAssets (/node_modules/critical/src/file.js:298:8)
    at getStylesheet (/node_modules/critical/src/file.js:838:27)
    at async mapAsync (/node_modules/critical/src/array.js:6:20) {
  reason: 'Unknown word',
  file: '/assets/css/main.499de48c.css',

Any idea the cause?

simplerethink avatar Aug 27 '22 23:08 simplerethink

Looks like adding this may have resolved my issue.

eleventyConfig.setServerPassthroughCopyBehavior("copy");
eleventyConfig.addPassthroughCopy("public");

Originally, I only had this, as mentioned in #2:

eleventyConfig.setServerPassthroughCopyBehavior("copy");

simplerethink avatar Aug 28 '22 00:08 simplerethink