Avata Suljettu

Add Styles/Scripts CDN links to the MVC Application #3198


User avatar
0
sukhdeep.dhillon luotu
  • ABP Framework version: v5.2.2
  • UI type: MVC
  • DB provider: EF Core

How to add styles or scripts CDN link to the default layout of MVC application.

ABP doesn't allow to add direct CDN links to the bundling system.

Plus, how to add links at a specific line. for example: if I have 20 styles and 15 scripts to download in one page. how can I specify the sequence(script1.js should be before script2.js) using Layout hooks.


3 Vastaus (t)
  • User Avatar
    0
    maliming luotu
    Tukitiimi Fullstack Developer

    hi

    The CDN feature is not available on the bundling system now.

    https://github.com/abpframework/abp/issues/294

  • User Avatar
    0
    sukhdeep.dhillon luotu

    Hi,

    if its not available then what is the best way to add CDN links?

  • User Avatar
    0
    maliming luotu
    Tukitiimi Fullstack Developer

    You can add your CDN in the view and render it by the https://docs.abp.io/en/abp/latest/UI/AspNetCore/Layout-Hooks

Made with ❤️ on ABP v8.2.0-preview Updated on maaliskuuta 25, 2024, 15.11