mhanberg / mhanberg/jekyll-postcss

SCSS files not accepting minification

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
70
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Hello, I'm currently using `jekyll-postcss` to use Tailwind in a Jekyll project. It's working really well with `.css` files, in fact it's working perfectly, but there are issues when trying to use a `.scss` file.

If I use a `.scss` file, then Tailwind will still work, but a source map will be generated even in production and minifier plugins like [cssnano](https://github.com/cssnano/cssnano) won't work.

Observe, `.css`:
![image](https://user-images.githubusercontent.com/4723091/121852555-83086380-cca4-11eb-94d8-f2a90929e9f1.png)

`.scss`:
![image](https://user-images.githubusercontent.com/4723091/121852589-8f8cbc00-cca4-11eb-8f17-cb1b0608515b.png)
![image](https://user-images.githubusercontent.com/4723091/121852619-99162400-cca4-11eb-8e5b-7af584fa8730.png)

Changing only the extension causes this radical shift in behavior. Of course, I don't want to use an unminified CSS file like this in production so I will have to stick to `.css` for now.

Do you have any idea what could be causing this issue, and if so, how to fix it? Is this my fault or Jekyll's or `jekyll-postcss`'s?

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or tests are named. Start by reproducing the production build with identical .css and .scss inputs in a Jekyll project, then compare the generated output and processing path. Done means SCSS receives the same minification behavior as CSS without an unwanted source map.

Written by the indexing model from the issue text.

Assessment

Tech stack
jekyll, ruby, scss, tailwindcss
Domain
build-system, tooling, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.