Try our conversational search powered by Generative AI!

Cachebreaker for Dojo widgets?

Vote:
 

Have can I force the client browser to download the latest copy of the MyProperty.js?

The .js is not in a bundle and I cannot add a querystring to the reference as the file is never referenced in a classic way.

I've built a Custom Dojo widget and placed it at \ClientResources\Scripts\Editors\MyProperty.js together with a html-template and a CSS.

In my module.config I have:

    
        
        
            
        
    

And I've added a EditorDescriptor:

    [EditorDescriptorRegistration(TargetType = typeof(IEnumerable))]
    public class ListboxDescriptor : EditorDescriptor
    {
        public ListboxDescriptor()
        {
            ClientEditingClass = "alloy/editors/MyProperty";
        }
    }
#193321
May 29, 2018 8:47
Vote:
 

One way to solve this is using the clientResourceRelativePath that can be configured in your module.config.

Look for the heading "
Versioning client resources" in Configuring shell modules.

#194132
Jun 14, 2018 10:36
Vote:
 

I also realized that we have an example of one way to automate this: https://github.com/episerver/AddOn.Favorites/

There is this msbuild task that will create a nuget package containing the addon as a zip file that will contain directories that is versioned.

https://github.com/episerver/AddOn.Favorites/blob/master/msbuild/Main.proj#L54

#194144
Jun 14, 2018 13:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.