Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

SASS build issues #8580


User avatar
0
mattkeene created

We've upgraded from 5.5 to 8.1 in one leap. This has been painful but we're nearly there. However, we hgave one outstanding issue building our custom SASS files How is custom SASS built and compiled now with gulp and bundles? Previously this was straightforward as setting styleext to scss in angular,json. We have added a task to the gulp file to build sass but we cannot get this going with either a watch task or with hmr so the only way we can currently pick up style edits is to rebuild which is not practical.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Bundling styles hasn't been changed. The newly added GULP just bundles styles which are loaded dynamically at runtime. For example, there are themes/default/css/style.bundle.min.css, themes/theme2/css/style.bundle.min.css and so on. The correct theme style file is loaded according to current user's selected theme option. Because of that, we can't include those style files into angular.json. But, in your case, you can just include your style files into angular.json.

    There is one more thing, AspNet Zero uses less by default and as far as I know, angular-cli doesn't support using less and saas together but I'm not sure. You can check Angular's GitHub repository for that.

    Thanks,