Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDN configuration from the site general settings is ignored #17

Open
kumards opened this issue Aug 23, 2016 · 2 comments
Open

CDN configuration from the site general settings is ignored #17

kumards opened this issue Aug 23, 2016 · 2 comments
Labels

Comments

@kumards
Copy link

kumards commented Aug 23, 2016

There is a configuration "Use CDN" under site general settings is ignored when combinator is enabled. It always picks the local version and falls back to cdn only when local resource url is not set.
I see the below method from ResourceDefinitionExtensions.cs is used to get the full path which has no access to the site settings.

 public static string GetFullPath(this ResourceDefinition resource)
        {
            if (string.IsNullOrEmpty(resource.Url)) return resource.UrlCdn;

            if (resource.Url.Contains("~")) return resource.Url;

            return Path.Combine(resource.BasePath, resource.Url);
        }
@Piedone Piedone added the bug label Aug 23, 2016
@Piedone
Copy link
Member

Piedone commented Aug 23, 2016

Yes, that feature was added later than I've implemented this in Combinator so it indeed causes this incompatibility.

However if most of your static resources come from CDNs there is not too much point in bundling them locally.

@kumards
Copy link
Author

kumards commented Aug 24, 2016

I do have lot of js files that require bundling and minification where I find Combinator very handy. Only the js libraries need CDN support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants