Keep source maps for the unprotected build only; never publish maps for MeowShield output
Disclosure: I help promote MeowShield. A source map is a courtesy to your future self: it points a debugger back at the file you actually wrote. After a MeowShield protect step, that courtesy becomes a bypass. If you upload a map that reconstructs the input, you have published the readable program next to the protected one.
Split the two artifacts
Keep maps for the unprotected build that developers run locally and in staging, where the source is supposed to be readable. For the file you send to the authorized API, and for the file you receive back:
- do not generate a public source map for the protected output
- do not leave an older map on the CDN whose
fileorsourcesContentstill match the pre-protect bundle - do not point
//# sourceMappingURLat an internal map that is reachable without auth
// Release upload: refuse to publish if a map for the protected file is present if (exists(protectedPath + ".map") || /sourceMappingURL=/.test(protectedCode)) { throw new Error("Refusing upload: protected artifact carries a source map reference"); } If you need to debug a production incident, pull the previous unprotected build and the options snapshot in a private environment. Do not solve the incident by putting a map on the public origin "just for an hour."
Honest limit
Obfuscation raises the cost of casual inspection; it does not make a public map safe. MeowShield's own guidance is that no protection is absolute. Publishing a map is how you give the absolute part away. Keep apiToken and source out of the browser, and treat the protected file and its map policy as part of the same release review.
The Playground, option docs, and API contract are all linked from MeowShield.