From f562ff99db4606bbd1badce7c7881852b77e200c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 14 May 2022 15:51:04 +0200 Subject: [PATCH] postcss: Fix import error handling Note that we will now fail if `inlineImports` is enabled and we cannot resolve an import. You can work around this by either: * Use url imports or imports with media queries. * Set `skipInlineImportsNotFound=true` in the options Also get the argument order in the different NewFileError* funcs in line. Fixes #9895 --- content/en/hugo-pipes/postcss.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/hugo-pipes/postcss.md b/content/en/hugo-pipes/postcss.md index fddc7e9cf..154f97f0b 100755 --- a/content/en/hugo-pipes/postcss.md +++ b/content/en/hugo-pipes/postcss.md @@ -44,6 +44,10 @@ URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+San Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file. Hugo will look for imports relative to the module mount and will respect theme overrides. +skipInlineImportsNotFound [bool] {{< new-in "0.99.0" >}} + +Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true. + _If no configuration file is used:_ use [string]