Skip to content

Is there possibility to run command before compression? #25447

Discussion options

You must be logged in to vote

We don't have a specific MSBuild target for this purpose. You could look at the framework sources and try to find a place that's suitable for plugging in your custom logic, but it's outside the normal range of supported scenarios.

However instead of doing this I would make a different suggestion. I see your goal is to load blazor.boot.json from a custom location. You could do that by patching JavaScript's fetch function. For example:

<script>
    var originalFetch = window.fetch;
    window.fetch = function(url, options) {
        if (url === '_framework/blazor.boot.json') {
            // Custom logic to return any content you want
            return originalFetch('https://example.com/my…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Krzyrok
Comment options

Answer selected by Krzyrok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants