BundlerMinifier
BundlerMinifier copied to clipboard
Object reference not set to an instance of an object
hey,
it was working just fine until today i opened my project , make some changes in a js file then i tried to bundle using the command line and i got this error
(bundler & minifier) Object reference not set to an instance of an object
any suggestions?!
It seems to be an issue with minifier. Just bundling work fine.
Also css bundling and minifying works just fine.
Did the latest Visual Studio update break anything?
this means there is some issue with the JS you added. It could be you are adding ES 2015 + things? we have a similar issue right now and am trying to fix it.
Any update on this issue ? what changes caused this problem ?
I had to set minify.enabled to false. Minifier was failing for some reason. Luckily i can set minification in webpack configuration.
I am also facing the same problem.
I have the same issue when try to minify bootstrap.bundle.js ([email protected]) BuildBundlerMinifier Version="3.2.449"
I though that this issue was occurring due to the size of the Bootstrap v5 Files. However this can easily be produced by trying to minify any of the bootstrap v5 files.
In my case it was because of the optional chaining operator ?
Solved by refactoring all "??" nullish coalescing operators with "?:" conditional (ternary) operators.
Will somebody fix this issue (and other issues), or is this library not maintained by anybody anymore?
Just set minify "enabled": false
Just set minify "enabled": false
How does that solve the problem of minifying files with nullish coalescing operator?
If anyone's reading in 2023, I got around this issue and was able to build successfully with Bootstrap 5 by using Visual Studio 2022 and these extensions:
https://marketplace.visualstudio.com/items?itemName=Failwyn.BundlerMinifier64
https://marketplace.visualstudio.com/items?itemName=Failwyn.WebCompiler64