Search code examples
javascriptcssbuildnativescriptminify

NativeScript - How to prevent CSS minification?


I've got NativeScript 3.3.0 installed. My project-wide CSS is in app/app.css.

When I run the app, either by console

tns run android --device [device-ID of my preferred emulator]

or by starting it in an Android emulator through JetBrain's WebStorm (with NativeScript plugin installed), the app.css always gets minified during the rebuilding process after I do some changes to it while the app is running.

Is it somehow possibile to prevent NativeScript from minifying the CSS file upon building the app? I wished there was a run parameter with which I could toggle that.


Solution

  • Looks like you have nativescript-dev-sass installed if you uninstall it, the minification should stop.

    But ideally, you would want to keep the minification.

    Edit:

    you can do, npm remove -D nativescript-dev-sass

    and you remove those nativescript-dev-sass files which are in hooks folder (if it doesn't get removed automatically).

    Also if you see node-sass in your devDependencies, remove that as well with

    npm remove -D node-sass and you should be good to go. Cheers!