1:
I want to put my blazor app files on cdn.
Now blazor is loading all files from _framework folder.
Can we have configurable option to set which file load from where, e.g. mono.js, mono.wasm, mscorlib.dll and etc.
2:
Also will be great if we provide general cdn for blazor apps where will be hosted all blazor assets by versions, files which are static for particular version (eg mono.js, mono.wasm) and also common dlls which are not modified by linker.
If we will have this cdn and blazor app can be configured to use those files by developer's decision, we will get files faster also e.g. blazor app 2 will use cached files for blazor app1 and will load much faster.
In the future when blazor popularity will grow there will be high probability that there is already loaded some blazor app before loading our blazor app and in result app will load heavy files from cache faster because cdn provided files already will be there.
To achieve this, all files should be hosted in one general purpose cdn for blazor.
If developer thinks it is better don't to use linker and use browser cached cdn files it will be optional, if no they will use current model where all linker reduced dlls are in _framework folder.
For files which are not modified by linker (eg mono.wasm, mono.js) having them on cdn will be benefit in all case.
This can help reduce download size pain and should be considered carefully.
Good idea @Lupusa87. English is not my native language but I think you should change asserts to assets in title and in the first sentence of second paragraph.
Thank you.
I discussed this with @chucker in gitter chat, idea belongs him more than me, but more important is if this idea will be realized and bring some real benefits.
Imagine if we could have something like:
<link href="https://components.mycompanyazure.net/1.0.*/text/pink-textbox.dll" type="blazor-lib"/>
the pink-textbox.dll would have the component(s) that would be maintained by our UI engineering team and if a bug was found in version 1.0.1 they would deploy version 1.0.2 and our app would just load it without the need for a new deployment of our application.
This would be sooooo good, a real UI as a Service (already seeing some companies selling the service).
Today this is possible with webcomponents, but having all packaged in a nice an simple DLL that would be a dream come true.
I would encourage you to open a separate issue for this, as it鈥檚 quite interesting but rather distinct from what OP is proposing.
You're right, will do.
It鈥檚 a great idea, @Lupusa87
But is it not a hosting question? The files could be on Netlify...