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

Multiple instances using same bundle #290

Open
gfaessler opened this issue Nov 8, 2023 · 0 comments
Open

Multiple instances using same bundle #290

gfaessler opened this issue Nov 8, 2023 · 0 comments

Comments

@gfaessler
Copy link

gfaessler commented Nov 8, 2023

We are using weboptimizer on the Umbraco CMS to bundle css and js files. On the CMS, the customer can use widgets and can have multiple instances of the same widget on the same page. For exemple he can use 3 instance of an Image Gallery widget.

If we include the bundle in the [Image Gallery] widget view using the tag helper : <link rel="stylesheet" href="/css/bundle.css" />, the tag will be repeated each time the widget is used in the page which seems not optimal.

To avoid this we could integrate all bundles once on the root view but that means there will be potentially a lot of unused css/js on the page.

We also tried to use the method AddFileVersionToPath(string path) to include the bundle by code if required but it seems that this method doesn't work when using the bundle path.

Any hint would be welcome. I have the feeling that we took a wrong turn somewhere.

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

1 participant