the blazor.js files are already minimized. you should avoid js components with blazor. there are several common bundlers, webpack, Parcel or rollup.
Is there a way to minify or bundle or pack blazor wasm js?
Is there a way to minify or bundle or pack blazor wasm js?
For example all of these files that get downloaded, some of them are third party libs but I want a generic "pack any js" into one file library.
3 answers
Sort by: Most helpful
-
-
Ping Ni-MSFT 4,720 Reputation points Microsoft Vendor
2024-04-17T06:18:10.58+00:00 Hi @RSa,
According to the Microsoft Documentation, ASP.NET Core is compatible withWebOptimizer
, an open-source bundling and minification solution. For set up instructions and sample projects, see WebOptimizer. ASP.NET Core doesn't provide a native bundling and minification solution.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Rena -
A SIVAGAYATHRI 0 Reputation points
2024-09-29T13:04:36.44+00:00 Yes, you can minify and bundle Blazor WebAssembly (WASM) JavaScript by using the built-in optimization features provided by .NET. During the production build (dotnet publish -c Release), Blazor automatically minifies and bundles the JavaScript files to reduce the overall size for faster load times. You can also use additional tools like Webpack or custom build steps if needed for more control.