bitplatform
bitplatform copied to clipboard
Make solution compile-able on MacOS
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
The current solution is in .net6.0, but it cannot be built on MacOS (and presumably Linux).
The reason for this is the package BuildWebCompiler2022 which is only available in .netcoreapp3.1 and not .net6.0.
Furthermore, the package tries hard to access "cmd.exe", which of course is not available on MacOS, nor on Linux.
Describe the solution you'd like
The solution would replace BuildWebCompiler2022 with platform-independent solution.
Additional context
@linkdotnet thanks for submitting this issue. it seems the nuget package that we are using for compiling .scss files (BuildWebCompiler2022) is only for Windows. we need to investigate it and find a proper solution.
Part of the issue has been resolved by #2893
Small input from my side as I fiddled around on my MAC: This seems a potential candidate: https://github.com/koenvzeijl/AspNetCore.SassCompiler
The problem with LibSassBuilder (cc @ysmoradi) is that it does not support arm64 architecture (issue gets tracked here). There is a newer version DartSassBuilder but this seems to have a high risk of not being maintained very long.
We rely on BuildWebCompiler2022+ in the following scenarios:
1- Building CSS files from SASS files
2- Minifying JavaScript output of the TypeScript compiler
To make the solution compilable on Mac / Linux, we need replacement(s) for both usages
At the moment, we've removed javascript minification from our project templates (TodoTemplate and AdminPanel), and we've replaced BuildWebCompiler2022+ with LibSassBuilder so we do expect people would be able to build our project templates on all operating systems.
Note that ProjectTemplates and even Bit Blazor UI demo project (Called Playground) have an App project which is a blazor hybrid project and at the moment, you've to unload that and we don't have a short-term plan to support blazor hybrid in IDE/Platform other than VIsual Studio / Windows
P.S. It seems that LibSassBuilder itself won't work on new mac devices as you mentioned before. I can create a temporary branch that contains project templates with DartScssBuilder so we can make sure that project templates are good to go
For Bit Blazor UI and its demo project, we need to figure out what is/are replacement(s) for BuildWebCompiler2022+ that fulfill our requirements (javascript minification and SASS to CSS compilation)
@linkdotnet
Thanks for the input @ysmoradi.
Please don't consider this with urgency. Seems like not that many people have that problem and for my part, I do have a spare windows notebook. So that is more of a luxury problem ;)
Note that projects that are being created using bit project templates are now compilable on all platforms thanks to Abstractions Sass Compiler nuget package
Need more work on Bit Blazor UI & its demo project
Closed by #4529