Skip to content

How to make dynamic assets injectable? #1656

Open
@s-a

Description

@s-a

I try to inject code changes via browser-sync proxy, but my solution causes a full page reload :(

bs.watch('c:/inetpub/wwwroot/Kentico9/CMS/customer/**/*.css').on('change', function (fn, a, b) {
    bs.reload('http://localhost:3000/CMSPages/GetResource.ashx')
    bs.notify(`refreshed ${fn}`)
});

Wondering that

bs.watch('c:/inetpub/wwwroot/Kentico9/CMS/customer/**/*.css').on('change', function (fn, a, b) {
    bs.reload('/CMSPages/GetResource.ashx?stylesheetfile=/customer/Stylesheets/TopicWorlds.css')
    bs.notify(`refreshed ${fn}`)
});

does not work... Is it possible to make such resources injectable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions