https://discord.umbraco.com logo
#package-development
Title
# package-development
j

Jason

10/28/2021, 10:53 PM
Cool, if it was me I'd probably try a couple of other approaches first: Firstly can you handle colours with CSS variables? If you can then you won't need to process (S)CSS - you can just supply the vars directly to set colours/breakpoints etc. You can get Webpack to chunk the CSS/JS according to the feature-sets that can be turned on and off and then can get Umbraco to only load the specific CSS/JS for features when they're used (you can also use dynamic imports for this). This needs your CSS and JS to be super-modular but I think that's what your aiming for anyway. Second option. Use an external build process. Webpack will perform poorly on your webserver (especially if SASS is involved) and will slow down your site. If it's used sparingly you'll get away with it but personally I wouldn't take that risk. How about you have your custom dashboard trigger something (an Azure Function or similar) that builds your frontend independently of your site then deploys it into your site.