Skip to content

Commit da5b1fc

Browse files
committed
tailwindcss: Add referece to skipInlineImportsNotFound when import not found in assets
See #14273
1 parent 39649dc commit da5b1fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎resources/resource_transformers/cssjs/inline_imports.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ func (imp *importResolver) importRecursive(
118118
LineNumber: offset + 1,
119119
ColumnNumber: column + 1,
120120
}
121-
return 0, "", herrors.NewFileErrorFromFileInPos(fmt.Errorf("failed to resolve CSS @import \"%s\"", filename), pos, imp.fs, nil)
121+
msgDetail := "if this import's source lives in node_modules, enable the skipInlineImportsNotFound option, see https://gohugo.io/functions/css/postcss/#skipinlineimportsnotfound"
122+
return 0, "", herrors.NewFileErrorFromFileInPos(fmt.Errorf("failed to resolve CSS @import \"%s\"; %s", filename, msgDetail), pos, imp.fs, nil)
122123
}
123124

124125
i--

0 commit comments

Comments
 (0)