diff options
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/rollup.config.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/rollup.config.js b/packages/taler-wallet-cli/rollup.config.js index 6f877ea27..15ec58e5e 100644 --- a/packages/taler-wallet-cli/rollup.config.js +++ b/packages/taler-wallet-cli/rollup.config.js @@ -4,7 +4,8 @@ import nodeResolve from "@rollup/plugin-node-resolve"; import json from "@rollup/plugin-json"; import builtins from "builtin-modules"; import pkg from "./package.json"; -import sourcemaps from 'rollup-plugin-sourcemaps'; +import sourcemaps from "rollup-plugin-sourcemaps"; +import path from "path"; export default { input: "lib/index.js", @@ -12,6 +13,15 @@ export default { file: pkg.main, format: "cjs", sourcemap: true, + sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => { + // Transform to source map paths to virtual path. Otherwise, + // error messages would contain paths that look like they should exist (relative to + // the bundle) but don't. + const res = path.normalize( + path.join("/_walletsrc/packages/taler-wallet-cli/src/", relativeSourcePath), + ); + return res; + }, }, external: builtins, plugins: [ @@ -29,5 +39,4 @@ export default { json(), ], -} - +}; |