| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -97,10 +97,17 @@ class MapGenerator { | |||
| 97 | 97 | let from = node.source.input.from | |
| 98 | 98 | if (from && !already[from]) { | |
| 99 | 99 | already[from] = true | |
| 100 | - this.map.setSourceContent( | ||
| 101 | - this.toUrl(this.path(from)), | ||
| 102 | - node.source.input.css | ||
| 103 | - ) | ||
| 100 | + let fromUrl = this.toUrl(this.path(from)) | ||
| 101 | + if (this.mapOpts.absolute) { | ||
| 102 | + if (pathToFileURL) { | ||
| 103 | + fromUrl = pathToFileURL(from).toString() | ||
| 104 | + } else { | ||
| 105 | + throw new Error( | ||
| 106 | + '`map.absolute` option is not available in this PostCSS build' | ||
| 107 | + ) | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + this.map.setSourceContent(fromUrl, node.source.input.css) | ||
| 104 | 111 | } | |
| 105 | 112 | } | |
| 106 | 113 | }) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments