locomotivemtl / locomotive-boilerplate

🚂 Front-end boilerplate for projects by Locomotive.
https://locomotivemtl-boilerplate.vercel.app/
MIT License
455 stars 71 forks source link

Update node version to v17.9 and switch from node-sass to sass #139

Closed devenini closed 1 year ago

devenini commented 1 year ago

This pull request updates the node version from v14.17 to v17.9, and replaces the deprecated node-sass module with sass. These updates will simplify maintenance and future-proof the boilerplate by ensuring the use of non-deprecated packages.

Key changes :

cloudflare-pages[bot] commented 1 year ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: af57ebd
Status: âœ…  Deploy successful!
Preview URL: https://a9fbfdc5.locomotive-boilerplate.pages.dev
Branch Preview URL: https://feature-update-node-version.locomotive-boilerplate.pages.dev

View logs

devenini commented 1 year ago

Node 18 is not available in Cloudflare Pages for now but will be in the near future. Source

An easy quick fix is to downgrade the node version to v.17.x for projects with an environment that requires a specific version.

mcaskill commented 1 year ago

The sass package is a distribution of Dart Sass compiled to pure JavaScript.

For those who have Dart Sass with Dart VM, is there a way to ignore the NPM package and use the native binary?

I have not tested how fast Dart is compared to the JS compiled version.

devenini commented 1 year ago

To my knowledge, it is not possible to ignore the NPM package and use the native binary if Dart Sass is already installed. However, using the JavaScript library provides a convenient way to manage dependencies with NPM and aligns with our other JavaScript build tasks. Additionally, prioritizing the use of NPM packages is important, especially as we are using more cloud-based deployment solutions like Cloudflare Pages.