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.

asked Jan 19, 2020 at 5:54

1 Answer 1

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 :)

answered Jan 19, 2020 at 9:22
2
  • Thank you so much for clarifying this for me! Commented Jan 20, 2020 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. Commented Jan 20, 2020 at 19:04

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.