Skip to content

Commit afb22a3

Browse files
committed
Fix sourcemap issue
1 parent efa63b1 commit afb22a3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/ninety-kings-boil.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/webpack-plugin": patch
3+
---
4+
5+
Fix sourcemap issue

packages/webpack-plugin/src/loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ const devupUILoader: RawLoaderDefinitionFunction<DevupUILoaderOptions> =
4141
writeFile(classMapFile, exportClassMap()),
4242
])
4343
.catch(console.error)
44-
.finally(() => callback(null, code, map))
44+
.finally(() => callback(null, code, map ? JSON.parse(map) : null))
4545
return
4646
}
47-
callback(null, code, map)
47+
callback(null, code, map ? JSON.parse(map) : null)
4848
} catch (error) {
4949
callback(error as Error)
5050
}

0 commit comments

Comments
 (0)