Problem description:
I tried disabling the NextJS source map created by default by setting
const nextConfig = {
sentry: {
hideSourceMaps: true,
},
};
in next.config.js
. However, this did not disable the source map, and the _N_E
folder containing all my source code was still there in the sources tab of inspect.
Expected behavior:
Actual behavior:
The source map should be hidden.
Steps to reproduce:
- Create a new NextJS Repl.
- Modify your
next.config.js
file to look like this:
const nextConfig = {
reactStrictMode: true;
sentry: {
hideSourceMaps: true,
},
};
module.exports = nextConfig
Extra
I also believe that this should be disabled by default, as in many Repls the source is exposed. This could discourage the creators of the app as people can easily get their hands on the source code and keep it as their own.