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)
-
0
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,