jekyll / jekyll-sass-converter

A Sass converter for Jekyll.

Home Page:http://rubygems.org/gems/jekyll-sass-converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sourcemap option generates JSON instead of CSS

karrirasinmaki opened this issue · comments

Hey,

I updated to Jekyll 4.0.0 and jekyll-sass-converter 2.0.0. The problem is, the converter produces JSON file inside the output CSS file. See the screenshot below.

Screenshot from 2020-04-13 14-20-23

When disabled sourcemaps from Jekyll config file, everything works again.

sass:
  sourcemap: 'never'

This is an expected behavior.
The sourcemap is composed of JSON data but with an extension of .css.map.
So if your site is linked to /assets/css/styles.css, there will be the following files in the path _site/assets/css/:

_site
|_  assets
  |_  css
    |_  styles.css
    |_  styles.css.map

The contents of the CSS file is JSON data, that's the problem (and no map file exists).

How can I provide you more info to help investigate the issue?

You could push your repository to GitHub and provide me with the link.
If you wish to keep your source files private, you can try starting with a base site by running
jekyll new <path>, copy settings from your original site's config file, serve your site with
bundle exec jekyll serve and then add files step by step till you can reproduce the issue again..

Here's a stripped-down version of the project that had the issue. The same issue is still present here:
https://github.com/karrirasinmaki/jekyll-sass-converter-test-04-2020

@karrirasinmaki Thanks. Could you also run bundle exec jekyll build with the sample site locally and commit just the contents of the _site into a new branch named gh-pages and push that branch to your sample repo..?

Nevermind.. I traced the issue to jekyll-polyglot plugin..
Remove that from your Gemfile and everything builds as expected.

Please refer and subscribe to untra/polyglot#107 for updates

Great! That jekyll-polyglot did cause the issue.

Well, luckily it's possible to disable source maps and add line comments to point to sass sources. I'll go with that setup until the issue gets fixed.

sass:
  sourcemap: 'never'
  line_comments: true