Shazwazza / Smidge

A lightweight runtime CSS/JavaScript file minification, combination, compression & management library for ASP.Net Core
MIT License
365 stars 47 forks source link

Problem with map #176

Open jet1992 opened 1 year ago

jet1992 commented 1 year ago

Hello, here is problem using smidge when map(//# sourceMappingURL=url) is in js/css file and we want to have that line because if version changed etc it has by default, but we don't using map files. image Smidge throws error: Could not parse {bundleId} as a valid smidge path image And image I think here better solution would be if BundleRequestModel returns empty bundle and then in controller: image It will be like now returns no page found(because first if will return true) and will be better solution, because returning error in BundleRequestModel flooding logs. So better solution I think not to check if bundle exists in BundleRequestModel, but return not found page. And error code 404 is better for this issue I think

Shazwazza commented 1 year ago

Hi, thanks for the report. Would it be possible for you to create a PR to address this?

jet1992 commented 1 year ago

Hi, ok, I will try to create

craigs100 commented 2 months ago

I see same issue with Umb V13.4.1 when in Production and opening Chrome Dev Tools the Umbraco log fills up with : "System.InvalidOperationException: Could not parse bootstrap.min.css.map as a valid smidge path" The boostrap.min.css.map file is there in the same place as bootstrap.min.css but it isn't defined in the Master template with a: "SmidgeHelper.RequiresCss("~/assets/dist/css/bootstrap.min.css.map");"

I suppose the question is, should it be specified or should it "just work"?