0

I need to compile CSS.less files, however node.js is very resource-consuming which therefore cannot be used in our current hosted account. To work on themes, documentation recommends to change mode to client side compilation. Accordingly, asides node.js what do I need installed on windows 10, and how do the revisions take effect once I switch to server side compilation as I move from development mode to production mode?

Accordingly, stylesheet revisions when frontend development workflow is set to server side throws errors, and when switching to client side less compilation it also produces errors, however when switched back again to server side less compilation, the edits do "compile", even though this seems like an atrocious way to go about doing this. This is unclear exactly how the CSS is being compiled.

All I need are minor revisions to a template which should be done by inspecting elements in the browser, and then making the revisions in the less files or by adding a custom css file when needed.

0

Magento does recommend using client-side less compilation? Just... where did you read about it? For sure not on the official webpage of magento :)

It says few things about the compilation.

Please read: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html

You don't need the node-js to do the server-side compilation.

Node.js & grunt is just a thing to speed up the development process.

Just use this

php bin/magento setup:static-content:deploy -f

You need to use the -f flag if you are in development or developer mode.

It will compile your .less files and then you need to refresh the page.

Not sure if you need to clear the cache :)

2
  • Thank you so much for clarifying this for me! – Eran Ariel Jan 20 '20 at 18:59
  • I am certain that I have read in the documentation regarding client-side less compilation for theme development. I'll look for the reference to this. – Eran Ariel Jan 20 '20 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.