tbela99 / css

A CSS parser and minifier and sourcemap generator written in PHP
Other
14 stars 1 forks source link

use relative paths in sourcemap #149

Open shish opened 10 months ago

shish commented 10 months ago

Right now the source map generates filenames which are absolute paths on disk (/home/shish/project/blah.css), which the browser interprets as absolute paths relative to the web root (https://www.shish.io/home/shish/project/blah.css), which means that they will never be found (unless your web server is configured to serve the root of your hard drive)

Using relative paths seems like it should work in more cases, and also has the bonus of revealing a bit less about the internals of my server (../blah.css instead of /home/shish/project/blah.css)