How to disable js minify at nop4.5

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 年 前
I set bundling false for js and CSS. But still, the js file is minified and kinda unreadable.
2 年 前
you can check this discussion

https://github.com/nopSolutions/nopCommerce/issues/5834
2 年 前
sina.islam wrote:
I set bundling false for js and CSS. But still, the js file is minified and kinda unreadable.


Minification is enabled for both cases and now isn't able to disable it by configuration. You can format JS/CSS via DevTools of the browser.
2 年 前
Looking for the solution of same problem.
1 年 前
Hi,
The setting has been moved to here
/Admin/Setting/AppSettings
cheers
mark
1 年 前
Hello,
I'm upgrading to 4.50 and I have this problem too.

It's very difficult to debug js if the files are minified.
We need a way to completely disable js and css minification and bundling.

Also, maybe this shoud be the default behaviour when not in Production environment.

Setting WebOptimizer.EnableJavaScriptBundling to false (appsettings.json) does not solve the issue, since the files are not bundled together anymore, but they are still minified.
1 年 前
You can opt out the processing of jScript files

<!script src="file.js"></!script>

See https://www.nopcommerce.com/en/boards/topic/93105/loading-scripts-in-v45-creates-an-error/page/2
1 年 前
Yidna wrote:
You can opt out the processing of jScript files

<!script src="file.js"></!script>


This is not a solution. The attribute asp-location does not work and I have to move the script tag in the right location. Then, when I finish to debug, move back the script to re-enable bundling...

It should be an easy setting to switch on and off when needed.

For now I made a workaround editing NopStaticFilesStartup and NopHtmlHelper files. But it's a workaround and when I finish the upgrade I will revert the files to their original versions.
1 年 前
matteo.melli wrote:
You can opt out the processing of jScript files

<!script src="file.js"></!script>


This is not a solution. The attribute asp-location does not work and I have to move the script tag in the right location. Then, when I finish to debug, move back the script to re-enable bundling...

It should be an easy setting to switch on and off when needed.

For now I made a workaround editing NopStaticFilesStartup and NopHtmlHelper files. But it's a workaround and when I finish the upgrade I will revert the files to their original versions.


The setting has been moved to Configuration -> Settings -> App Settings (at the bottom of the page) - https://ibb.co/mbk829x
1 年 前
Nop-Templates.com wrote:

The setting has been moved to Configuration -> Settings -> App Settings (at the bottom of the page) - https://ibb.co/mbk829x


I know these configurations and they are the same as the ones in appsettings.json I mentioned.
They are all unchecked, but even if the bundling is off, the files are still minified individually, so they are hard to debug.
And no, the "pretty print" feature of Google Chrome is not a solution. If I give a variable a meaningful name, I'd like to see it...

Anyway I assume there is no out-of-the-box solution for this (I also looked at the code) or I'm missing something.
Maybe I should open an issue?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.