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

AJAX / Duplicated CSS file #67

Open
cluwong opened this issue Sep 24, 2018 · 2 comments
Open

AJAX / Duplicated CSS file #67

cluwong opened this issue Sep 24, 2018 · 2 comments

Comments

@cluwong
Copy link

cluwong commented Sep 24, 2018

I have a page where some parts of the content is fetched via AJAX.
When all assets are minified, the ajax content includes link to a css file which has already been included in the minified file. This is causing an issue if there are customized style defined for a specific class, and that is overwritten by this css file.

Eg, the ajax content displays bootstrap Progress widget which requires bootstrap.css. This css file has already been minified. In the html output for the ajax section there's additional html <link href="/minify/(random string).css" rel="stylesheet">.

If concatCSS property is set to false, this line does NOT appear in the output and the page is displayed as intended. It seems somehow the ajax page knows that the file has already been included in the main page. Can this be fixed when concatCss property is set to true? Or is there a workaround solution not to minify asset files?

@kwazaro
Copy link

kwazaro commented Oct 5, 2018

As I understand, you can exclude such assets from minification, by using the component's configuration property 'excludeFiles' or even exclude specific AssetBundle by using excludeBundles

@cluwong
Copy link
Author

cluwong commented Oct 15, 2018

Thanks @kwazaro . Using excludeFiles is good for now as workaround solution - the specific file is not included in the minify and hence not duplicate in the ajax content.

It'd be nice to permanently fix so that the file can be included in the minified file and not duplicated.

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

No branches or pull requests

2 participants