Developer forum

Forum » CMS - Standard features » Sass source maps

Sass source maps

Thomas Schroll
Reply

Hi

I'm trying to setup use of sass source maps, but I get a 404 error from the browser when trying to see the scss file. Can dw not handle source maps, or am I doing something wrong?

Regards Thomas


Replies

 
Nicolai Høeg Pedersen
Reply

DW can handle any file - in fact, it is the IIS which does that. You need to generate a source maps to debug in the browser, so make sure you do that first.

 
Thomas Schroll
Reply

Hi Nicolai

I have generated a sourcemap file. In Chrome I see all relevant scss files in the sources tab, which tells me that the sourcemap is working correctly. In dw (Files) I can download all scss files and see the content locally, but when I try to see the content in Chrome the files seem empty. Also if I try to open the scss files in dw (Open in browser) I get a 404 error, whereas if I open the map file or the css files the same way, I see the content. Could it be a missing mime type or something about permissions? I have double checked that the paths are correct.

Regards Thomas

 
Nicolai Høeg Pedersen
Reply

Hi Thomas

Can you give me a link? Missing mime type sounds like a valid explanation. It is not there by default:

https://msdn.microsoft.com/en-us/library/bb742440.aspx

So you need to add it.

 
Thomas Schroll
Reply

Hi Nicolai

The solution is http://lachenmeier.net.dynamicweb.dk/ Can I add the mime type myself?

Regards Thomas

 
Nicolai Høeg Pedersen
Reply

You can add them in web.config. If IIS allows it:

https://technet.microsoft.com/en-us/library/cc725608(v=ws.10).aspx

 
Thomas Schroll
Reply

It didn't work adding the mime type, but I think I have misunderstood the concept. For everybody interested I will tell what I have done:

I added my local scss folder by right clicking in the source panel and selecting 'Add folder to workspace'. Then I right clicked a scss file and clicked 'Map to file system resource'. Now the chrome developer tool link to my scss files instead of the minified css on server.

Regards Thomas 

 

You must be logged in to post in the forum