addyosmani / addyosmani/critical

@import being removed entirely

Đang mở
#456 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
10.3k
Fork
390
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi there, I use `@import` for importing Adobe fonts to my site, however it appears that critical is removing my import statements in both the critical and uncritical CSS. Is there a way to keep it in?

Here's my gulp code:
```
const extractCriticalCSS = async () => {
return src('./dist/templates/**/*.html')
.pipe(flatmap((stream, file) => {
log("Extracting critical CSS for " + file.relative + "...");

const criticalPath = file.dirname + "/" + file.stem + "-critical.css";
const uncriticalPath = file.dirname + "/" + file.stem + ".css";

return stream
.pipe(critical({
inline: true,
base: './dist/',
target: {
css: criticalPath,
uncritical: uncriticalPath
},
extract: true,
ignore: {
atrule: ['@font-face']
}
}))
.on('error', err => {
log.error(err.message);
})
}))
.pipe(dest('./dist/templates'))
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.