# Source Map

Currently only supported in iOS 6.7.2 and above

Weixin Mini Program / MiniGame When packaged, all JavaScript code is packaged into one file. To make it easier for developers to locate the wrong location when debugging on a phone, Mini Programs / little games provide [[TIPS] Source Map Support provided.

When you turn on ES6 to ES5 and code compression in the developer tools, the.mapfile of the SourceMap is generated. Development version Weixin Mini ProgramThe base library uses the.mapfile in the code package to remap the error stack shown in the vConsole (for the developer code files only).

If you use an external build script to process the source file, simply place the corresponding generated SourceMap file in the same directory as the source file

Examples include:

pages/index.js
pages/index.js.map
app.js
app.js.map

The developer tools read, parse, and upload the SourceMap file

The Operation Center in the background of Weixin Mini Program can then use the uploaded SourceMap file for error analysis

# Note

  1. Source Map files are not included in the package size calculation and are not included in the Demo / Official Version package.
  2. Inline sourcemap does not count in the package size calculation.
  3. Due to the inclusion of the.mapfile in the development code package, the actual size of the package will be larger than the experience and official versions.