-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not generate source map in Jekyll::Converters::Scss#convert
#159
Comments
It’s a major change the rendering order, and if we force sass to be compiled eagerly, you lost the chance of optimizing performance by compiling sass in parallel with other pages. In my opinion it’s better to treat the css and source map outputs as static file assets instead of treating them as part of |
Actually, we don't have to compile Sass eagerly because Jekyll do not require a Since Jekyll's conversion phase is single-threaded for now, pages added later are guaranteed to be converted later. A workaround like this may be a start:
|
While your proposal would work, adding more complexity get around current design limitations is not good for long term maintenance of a big community project like Jekyll. Having a better design to support concurrency would be preferred over adding more and more code to make it work under the current design. In other words, while it is nice to have multi-threading support in Jekyll 4.x, in my opinion there will be too many hacks that would be difficult to maintain as a community project. It would be better to put this on 5.x roadmap and do a redesign there. Ideally all kinds of raw inputs should be able to be compiled concurrently, one input should be able to generate more than one outputs, and pages containing collection references can be detected and blocked for compilation until references are solved. |
jekyll-sass-converter/lib/jekyll/converters/scss.rb
Line 165 in e58afb8
Inside
Jekyll::Converters::Scss#convert
, the methodgenerate_source_map_page
is called, where a source map page is generated and pushed tosite.pages
. This is not a good approach. All pages should have been generated in the generation phase of the Jekyll site, not in the conversion phase. A better approach would be to create a class inheritingJekyll::Generator
dedicated to generate this source map.I found this problem because it made the source map not generated when I try to implement multithread rendering feature for Jekyll (jekyll/jekyll#9485).
The text was updated successfully, but these errors were encountered: