Comments (12)
@EWhite613 @knownasilya
I was able to successfully get "embedded sass host" working with ember-cli-sass. It's basically a faster implementation of dart-sass that uses a DartVM instead of pure Javascript. It's updated together with the dart sass project by the same team.
Super simple, just need to add:
const embeddedSass = require('sass-embedded');
sassOptions: {
implementation: embeddedSass,
outputStyle: 'expanded' //Required or 'compressed'
}
I was able to cut my production build time from 9 mins to 3 mins locally with this change vs dart-sass. (This is because we have 250 white labels to compile stylesheets for).
Confirmed no issues on Apple Silicon Mac & x86 Jenkins CI Linux Server.
from ember-cli-sass.
@drummy2 PR #192 should have defaulted installations of ember-cli-sass
to use dart-sass by default, removing the need for node-sass
. This was released in v8.0.1
.
from ember-cli-sass.
We have to stick to 8.0.1 because dart-sass
is painfully slow and the node-sass
never worked in newer versions.
from ember-cli-sass.
@robclancy Interesting. I haven't noticed any slow down when I switched a large ember app from node-sass -> dart-sass. At least we have the implementation
escape-hatch in this addon. Hopefully future versions of dart-sass will improve whatever slowness you're seeing.
from ember-cli-sass.
I made a comment about the slowness here as well: #192 (comment) TLDR: dart-sass
was 6x slower
When I told a @himynameisjonas about this they also switched back to node-sass
and got a speed increase by 4.5x.
from ember-cli-sass.
@javve we've also switched to node-sass
back. Our builds inside addon times are:
4.5-6 seconds vs 400-500ms for node-sass.
Then using the same addon inside the app with its own scss files is:
8-9 seconds vs 400-600ms for node-sass.
I highly recommend to make node-sass by default and dart version an opt-in.
Also, dart version allow to use variables that are not imported in the file were you are using them (or maybe dart version is smart enough to resolve dependencies? But not sure).
from ember-cli-sass.
Yeah honestly I'm probably just going to fork this in future based on when it was just node-sass
instead of trying to support everything.
from ember-cli-sass.
Making dart-sass
the default started here and was completed here, for reference.
The motivation was based on the fact that dart-sass
is the primary, default SASS implementation declared by the official sass-lang team. This means all new SASS features will land in dart-sass
first, which I assume would mean performance improvements too. IMO a package that wraps SASS, like this one, should default and "bet on" the default implementation that is supported by the official team.
As always YMMV - that's why there is an escape-hatch since other implementations do exist. For the projects I've worked on dart-sass
was a huge improvement over node-sass
due to no longer needing OS bindings, which caused a lot of pain in CI and fresh project installations (dart-sass
via NPM is compiled to pure JS).
Yeah honestly I'm probably just going to fork this in future based on when it was just node-sass instead of trying to support everything.
I think installing node-sass
and adding a one line config, is a much better tradeoff than forking 😄
from ember-cli-sass.
The fact it never worked when I tried to configure to node last time is why I will be forking it. Node is now a second class citizen here even though dart has significant performance regressions. And addons that try to do everything always do each thing a little worse than one that just does one thing well. If node-sass has a bug I guarantee it will take much longer to fix here than if this was only node-sass still. On smaller projects maybe I would use this version since it would be less sass to wait on, or more likely I would ditch sass all together since css is pretty good now. But dart-sass here is so slow... just no.
from ember-cli-sass.
Do we know if there's a way to point ember-cli-sass
to a non javascript implementation?
Say you have the dart-sass version running in the DartVm?
from ember-cli-sass.
The default is currently the dart sass version. Which is the only one that works on ARM processors as well.
from ember-cli-sass.
Oh, that might be worth a breaking change to make it the default.
from ember-cli-sass.
Related Issues (20)
- Exclusion Doesn't Work in passthrough
- Git tags missing
- feature request: import SCSS from another npm module HOT 4
- 8.0.1 breaking app HOT 1
- Please provide a changelog HOT 3
- Up for adoption? HOT 12
- Bug: incorrect options handling causes broccoli-funnel error
- includePaths doesn't recognise node_modules in yarn workspace HOT 1
- Going from 10.0.0 to 10.0.1 breaks our build HOT 1
- SASS rebuilding time is very high HOT 2
- Update addon section
- [bug] sass funnel being rebuilt on files that are not (.scss|.css|.sass)
- What is correct way to use dependencies on both of addon and dummy app? HOT 1
- Reopening #133
- Production builds produce invalid CSS HOT 1
- broccoli sass source maps outdated HOT 4
- [QUESTION] Should the app add the scss from the addon too?
- Does not work with Embroider HOT 5
- Multiple css outputs after outputPaths is removed? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-sass.