0

Is it possible to purposefully create a bad sourcemap for a javascript file to make it harder to see the pretty source code or debug through it to people outside the development team?

Do you know any tools to do that?

Where can I find the details of sourceMap format to try and do that myself?

2 Answers 2

1

It's impossible with sourceMap. Everyone can disable sourceMap in DevTools settings and debug original sources.

Sign up to request clarification or add additional context in comments.

Comments

1

Why would you want to do this? In general, when you are shipping production code that has been minified, you just don't compile a source map at all.

2 Comments

DevTools does a very good job at "prettifying" minimized code. I'd like to make things harder, and I'd thought that using a purposefully built sourceMap could confuse chrome tools enough to make my code less visible to others.
This isn't really possible, and is generally not a good idea. You really don't have any code that is worth hiding - unless you are including secure data in the front-end, in which case you have a much bigger problem.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.