Attempting to run a import of a regular css file in main.scss is causing Hugo to fail the build. Previously this would work, (i.e we’d not get a regular css import and instead the css file would be included with the rest of our scss partial imports.
Here’s my pipeline, all works fine when I omit the css import:
{{/* Pipe our styles */}}
{{ $stylesOptions := ( dict "targetPath" "/css/combined-styles.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/" )) }}
{{ $postCssOptions := (dict "config" "postcss.config.js" "use" "autoprefixer") }}
{{ $styles := resources.Get "scss/combined-styles.scss" | resources.ToCSS $stylesOptions | resources.PostCSS $postCssOptions | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}">
… and here’s the offending css import (note I’ve omited the file name as this shouldn’t be required)
@import "flickity/dist/flickity";
Any ideas if this is a bug or somthing the SCSS compiler doesn’t support?
full main.scss below for reference, note Foundation imports fine as it’s written in sass
// --------------------------------------------------------
// Developer - James Humphreys
// Developer URL - https://binaryjim.co.uk
// --------------------------------------------------------
// --------------------------------------------------------
// Resets
// --------------------------------------------------------
// iOS resets
@import "resets/ios-style-resets";
// --------------------------------------------------------
// Plugin Styles (remove those you dont require)
// --------------------------------------------------------
// Flickity
// @import "node_modules/flickity/css/flickity";
@import "flickity/dist/flickity";
// --------------------------------------------------------
// Settings
// --------------------------------------------------------
// Fonts
@import "settings/fonts";
@import "settings/icons";
// Custom Foundation settings
@import "settings/foundation-settings";
// --------------------------------------------------------
// Foundation framework
// --------------------------------------------------------
// Import Base Foundation Framework (required)
@import "foundation-sites/scss/foundation";
// Import all components
// @include foundation-everything();
// Or selectively include components (comment out above)
// Import selected components
@include foundation-global-styles;
@include foundation-xy-grid-classes;
// @include foundation-grid; (for float grid)
// @include foundation-flex-grid; (for legacy flex grid)
@include foundation-flex-classes;
@include foundation-typography;
@include foundation-forms;
@include foundation-button;
// @include foundation-accordion;
@include foundation-accordion-menu;
// @include foundation-badge;
// @include foundation-breadcrumbs;
// @include foundation-button-group;
@include foundation-callout;
// @include foundation-card;
// @include foundation-close-button;
@include foundation-menu;
// @include foundation-menu-icon;
// @include foundation-drilldown-menu;
// @include foundation-dropdown;
@include foundation-dropdown-menu;
@include foundation-responsive-embed;
// @include foundation-label;
// @include foundation-media-object;
// @include foundation-off-canvas;
// @include foundation-orbit;
// @include foundation-pagination;
// @include foundation-progress-bar;
// @include foundation-slider;
// @include foundation-sticky;
// @include foundation-reveal;
@include foundation-switch;
@include foundation-table;
// @include foundation-tabs;
// @include foundation-thumbnail;
// @include foundation-title-bar;
// @include foundation-tooltip;
// @include foundation-top-bar;
@include foundation-visibility-classes;
// @include foundation-float-classes; (for float grid)
// --------------------------------------------------------
// Custom mixins and components
// --------------------------------------------------------
// Mixins
@import
"mixins/helper-mixins";
// Components
@import
"components/grid",
"components/intro-block",
"components/branding",
"components/buttons",
"components/cta-block",
"components/cookie-notice",
"components/footer",
"components/forms",
"components/hamburger",
"components/responsive-navigation",
"components/typography",
"components/sections",
"components/sliders",
"components/aside-container",
"components/aside-nav",
"components/project-thumbnail",
"components/post-preview",
"components/article-meta",
"components/table",
"components/monokai-syntax",
"components/algolia-search",
"components/cost-calculator";
// --------------------------------------------------------
// Layout styles
// --------------------------------------------------------
@import
"layouts/homepage",
"layouts/services",
"layouts/portfolio-root",
"layouts/blog-root",
"layouts/contact";
/* That's all folks! */