Preprocessor for vendor specific css not working on windows 10.
POSTCSS: failed to transform "styles.css" (text/css): resource "css/styles.css_674d3a8c056e8697f10ad004211806b8" not found in file cache
- Installed postcss and autoprefixer (and added to path)
npm install -g postcss-cli
npm install -g autoprefixer
- added postcss.config.js to root
module.exports = {
plugins: {
autoprefixer: {
browsers: [
"Android 2.3",
"Android >= 4",
"Chrome >= 20",
"Firefox >= 24",
"Explorer >= 8",
"iOS >= 6",
"Opera >= 12",
"last 2 versions",
"Safari >= 6"
]
}
},
}
- testing out postCSS (on extended most recent version) in the hugo code causes error
{{ $styles := resources.Get "styles.css" | postCSS}}
{{ $syntax := resources.Get "syntax.css" }}
{{ $stylesCustom := resources.Get "stylesCustom.css" }}
{{ $styles = slice $styles $syntax $stylesCustom | resources.Concat "css/bundle.css" | minify |fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" />
- Checked binary locations
“We look for the postcss binary in 1) node_modules/postcss-cli/bin/ or 2) PATH…If not found we fall back to cached resources (if found)” - Bep
Windows puts the packages here:
C:\Users-----\AppData\Roaming\npm\node_modules\postcss-cli\bin\postcss
C:\Users-----\AppData\Roaming\npm\node_modules\autoprefixer\bin\autoprefixer
Hugo still looks in the cache, which is empty. On that note, configured cache in config here: and there’s not yet any bundles in there.
resourceDir = "/resources/"
[caches]
[caches.assets]
dir = ":resourceDir/_gen"
maxAge = "10s"
Windows thing, or is this missing something? (Also, is this cache config handled properly?)
Thanks