We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 745ad2c commit 618cb7dCopy full SHA for 618cb7d
2 files changed
index.js
@@ -222,7 +222,7 @@ function css(css, file) {
222
tasks.push(fs.outputFile(options.to, result.css))
223
224
if (result.map) {
225
- const mapfile = getMapfile(options.to)
+ const mapfile = getMapfile(opts)
226
tasks.push(fs.outputFile(mapfile, result.map))
227
}
228
} else process.stdout.write(result.css, 'utf8')
lib/getMapfile.js
@@ -1,4 +1,8 @@
1
'use strict'
2
-module.exports = function getMapfile(p) {
3
- return `${p}.map`
+const path = require('path')
+module.exports = function getMapfile(options) {
4
+ if (options.map && typeof options.map.annotation === 'string') {
5
+ return path.join(path.dirname(options.to), options.map.annotation)
6
+ }
7
+ return `${options.to}.map`
8
0 commit comments