Skip to main content

Source maps

Source maps are a tool for debugging minified or transpiled JavaScript code. They allow developers to map the transformed code back to its original source, making debugging and troubleshooting easier.

Source maps in development

When starting an Atoti UI application in development mode, source maps are automatically generated. No additional configuration is required.

Source maps in production

Production builds typically exclude source map files because they are unnecessary for end users and can reveal the original source code, posing security and intellectual property risks. However, in some cases, you may want to debug your application in a production environment by manually loading the source map files when needed.

When building an Atoti UI application for production, source map files are not generated by default. To generate them, use the --production-source-map-output-path CLI option and specify their output directory.

npx activeui-scripts build --production-source-map-output-path ./production-source-maps
note

Similarly, when building a reusable extension, you can use the same option to generate its source maps.

npx activeui-scripts build:extension --production-source-map-output-path ./extension-production-source-maps