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.
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.
clientdependency not bundled/minified
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.
master.cshtml:
rendered as:
ClientDependency.config
What am I missing?
Hi,
I think you are running the site in debug mode,
check the compilation config in the web.config file
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.Kevin
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
Thanks @KevinJump!
Hi,
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.is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.