Articles on: Build code

How disable javascript symbols/names minification

PlayCode uses esbuild under the hood.

Esbuild renames symbols to reduce code size and bundling sometimes need to rename symbols to avoid collisions. That changes value of the name property for many of these cases. This is usually fine because the name property is normally only used for debugging. However, some frameworks rely on the name property for registration and binding purposes. If this is the case, you can enable an option to preserve the original name values even in minified code. More on esbuild site.

Add a file playcode.config.json to root with code:
  "esbuildProduction": {
    "keepNames": true

Click to your name -> Settings -> Clear cache.
Restart the page.
Publish changes.

Note: playcode.config.json updates will apply only after cache cleaning.

Other options:
  "esbuildProduction": {
    "keepNames": false,
    "minify": true,
    "treeShaking": true

Updated on: 12/11/2022

Was this article helpful?

Share your feedback


Thank you!