Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using RequiresJs and RequiresCss and RenderJsHere and RenderCssHere, and the right files are getting added to my page. But, they're not being bundled or minified.
<link href="/css/slick.css?cdv=1" type="text/css" rel="stylesheet"/><link href="/css/jquery.fancybox.css?cdv=1" type="text/css" rel="stylesheet"/><link href="/css/main.css?cdv=1" type="text/css" rel="stylesheet"/>
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
What am I missing?
I think you are running the site in debug mode,
check the compilation config in the web.config file
<compilation defaultLanguage="c#" debug="true" batch="true" targetFramework="4.7.2" numRecompilesBeforeAppRestart="50" />
While in debug mode, ClientDependency doesn't bundle the style or script files.
If you set debug="false" then it should start to bundle the files.
That's what it was. So, it's not possible to bundle/minify while debuging?
How does clientdependency manage cachebusting, if I change one of my js or css files? I know I can manually change the version # in the cliendependency.config
when bundling the cache file hash is a generated based of the file names (so for example all the stylesheets, and the version number in clientDependency.config).
The quickest way to bust the cache is to change the client dependency version number (on v7 there is a health check for that), or change the name of one of your files. If you can its a good idea to set this up as a step in any deployment scripts you may have.
I have in the past (on a site where it was hard to get to the configs) - had a version.01.css file - and just incremented the version (it doesn't matter if the file is there or not). as this will change the version number.
For development, the best thing to do is have Chrome DevTools open and Disable Cache (while dev tools is open) checked.
Disable Cache (while dev tools is open)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted