We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09747fc commit 820180aCopy full SHA for 820180a
1 file changed
src/index.ts
@@ -151,9 +151,18 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = (options =
151
compilerFilePath,
152
)
153
154
+ const sourcemapFilePath = path.resolve(distCustomElementsOptions.dir, `${componentTag}.js.map`)
155
+ const rawSourcemap = await buildQueue.getLatestBuild(id, sourcemapFilePath)
156
+ const sourcemapExists = await compiler.sys.access(sourcemapFilePath)
157
+
158
+ const sourcemap = sourcemapExists
159
+ ? { sourceRoot: getRootDir(options), ...JSON.parse(rawSourcemap) }
160
+ : undefined;
161
162
return {
163
code: transformedCode,
164
inputFilePath: id,
165
+ map: sourcemap
166
}
167
},
168
0 commit comments