There was an error while loading. Please reload this page.
1 parent 90c9729 commit b7c556cCopy full SHA for b7c556c
1 file changed
lib/map-generator.js
@@ -186,6 +186,10 @@ class MapGenerator {
186
generateMap() {
187
if (this.root) {
188
this.generateString()
189
+ } else if (this.previous().length === 1) {
190
+ let prev = this.previous()[0].consumer()
191
+ prev.file = this.outputFile()
192
+ this.map = SourceMapGenerator.fromSourceMap(prev)
193
} else {
194
this.map = new SourceMapGenerator({ file: this.outputFile() })
195
this.map.addMapping({
@@ -196,7 +200,7 @@ class MapGenerator {
196
200
}
197
201
198
202
if (this.isSourcesContent()) this.setSourcesContent()
199
- if (this.previous().length > 0) this.applyPrevMaps()
203
+ if (this.root && this.previous().length > 0) this.applyPrevMaps()
204
if (this.isAnnotation()) this.addAnnotation()
205
206
if (this.isInline()) {
0 commit comments