Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Technical details: Abbreviated class names? #65

Open
jbarth-ubhd opened this issue Jul 27, 2021 · 2 comments
Open

Error: Technical details: Abbreviated class names? #65

jbarth-ubhd opened this issue Jul 27, 2021 · 2 comments

Comments

@jbarth-ubhd
Copy link

Dear reader,
how could I get the original class/function names?

grafik

get@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:18:363225
Be</<.annotations<@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:18:422676
Be<@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:18:422614
r@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:1:27507
p@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:1:28766
D/<@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:1:28973
S/F<@file:///home/jb/workspace/mirador-annotations/demo/dist/demo.c2b8bf94.js:1:26302
…
@jbarth-ubhd
Copy link
Author

@jbarth-ubhd
Copy link
Author

perhaps by disabling javascript minifier or like this:

"use strict"; // run with node index.js
var sourceMap = require("source-map");
var fs = require("fs");

const main = async function() { // wg. await
  let data;
  try {
    data = fs.readFileSync("......./mirador-annotations/demo/dist/demo.c2b8bf94.js.map", "");
  } catch(err) {
    console.error(err);
  }
  let rawSourceMap=JSON.parse(data);
  const consumer = await new sourceMap.SourceMapConsumer(rawSourceMap);
    console.log(
      consumer.originalPositionFor({
        line: 18,
        column: 363225
      })
    );
  consumer.destroy;
};

main();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant