Source Map
When a minigame is packaged, all JS code is bundled into a single file. To make it easier for developers to locate error positions when debugging on a phone, minigames provide Source Map support. When ES6-to-ES5 conversion and code minification are enabled in the developer tool, Source Map .map files are generated. If you use an external build script to process source files, you only need to place the corresponding generated Source Map file in the same directory as the source file For example:
game.jsgame.js.mapsrc/index.jssrc/index.js.map
The developer tool reads and parses the Source Map files and uploads them. Later, you can use the uploaded Source Map files in the Operations Center of the minigame backend for error analysis.
Notes
- Source Map files are not counted toward the code package size calculation, nor are they included in the trial/production code packages.
- Inline sourcemaps are not counted toward the code package size calculation.
- Since the development code package includes
.mapfiles, the actual code package size will be larger than the trial and production versions.
