You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I don't find any related docs, especially for standalone Blazor WASM. So if I miss the docs, just tell me and many thanks to you.
The current MapStaticAssets API seems to always compress all files in wwwroot and output them into staticwebassets.endpoints.json. So all files in wwwroot will be handled by specific endpoints. Is there a way that developers can decide which ones are inside the static assets when others are outside?
For example, an appsettings.json in standalone Blazor WASM. What if I have different contents of appsettings.json between different deploy-environment? I know one way is adding appsettings.{Env}.json and setting the environment variable. But what can we do if we cannot do this way? Because the json file is very small(<2kB), how can I exclude it for mapping? Now I have to change the file content and publish each time for each environment, as their appsettings.jsons' contents are different so that the contents of staticwebassets.endpoints.json are different too.
Another example, some static files(such as loadBootResource files) are on the CDN(which compression might not be necessary), while some are handled in local wwwroot. However, now each time of publish still compress all wwwroot files in the client project and output a relatively large staticwebassets.endpoints.json which only a quite little pieces of endpoints are expected to be visited. A large staticwebassets.endpoints.json slows the speed of project build and initializing duration of server application.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First of all, I don't find any related docs, especially for standalone Blazor WASM. So if I miss the docs, just tell me and many thanks to you.
The current
MapStaticAssets
API seems to always compress all files inwwwroot
and output them intostaticwebassets.endpoints.json
. So all files inwwwroot
will be handled by specific endpoints. Is there a way that developers can decide which ones are inside the static assets when others are outside?For example, an
appsettings.json
in standalone Blazor WASM. What if I have different contents ofappsettings.json
between different deploy-environment? I know one way is addingappsettings.{Env}.json
and setting the environment variable. But what can we do if we cannot do this way? Because the json file is very small(<2kB), how can I exclude it for mapping? Now I have to change the file content and publish each time for each environment, as theirappsettings.json
s' contents are different so that the contents ofstaticwebassets.endpoints.json
are different too.Another example, some static files(such as loadBootResource files) are on the CDN(which compression might not be necessary), while some are handled in local
wwwroot
. However, now each time of publish still compress allwwwroot
files in the client project and output a relatively largestaticwebassets.endpoints.json
which only a quite little pieces of endpoints are expected to be visited. A largestaticwebassets.endpoints.json
slows the speed of project build and initializing duration of server application.Hope for your kind help and thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions