最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Jekyll themes - Sass migrator failing due to to @import rules - Stack Overflow

programmeradmin9浏览0评论

I've been trying out some Jekyll themes, and they are all throwing the same deprecation warning:

Deprecation Warning [import]: 
Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

Fair enough, I've installed the Sass migrator and run the following migrate command within the project:

sass-migrator module --migrate-deps css/style.scss

And I always get back an error to the effect of:

Error: Expected "{".
  ╷
6 │ @import "_reset";
  │                 ^
  ╵
  documents/github/personal/css/style.scss 6:17  root stylesheet
Migration failed!

If I manually replace @import with @use, I get the following error:

Error: expected "{".
  ╷
6 │ @use "_reset";
  │              ^
  ╵
  documents/github/personal/css/style.scss 6:14  root stylesheet
Migration failed!

An excerpt from the stylesheet:

---
---

// - - - - - - - - - - Foundations

@use "_reset";
@import "_mixins";
@import "_plugins";

Clearly I'm formatting or doing something wrong but I'm at a loss and the sass documentation isn't making it clear to me. And then there are more deprecation errors but hopefully if I resolve these ones I can get the migrator running better! Any help is appreciated!

发布评论

评论列表(0)

  1. 暂无评论