You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 6.7.4
Cross-platform modules: 6.5.8
Android Runtime: 6.5.1
iOS Runtime: 6.5.1
Plugin(s):
Node.js: 12.16.3
Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack
Describe the bug
When using --env.uglify, Terser Plugin minifies class and function names. As a result, NativeScript's $parents[] references inside XML files are broken since they use component class names to get distant parent (e.g. $parents["Frame"]).
All in all, after minimizing, 'Frame' will be called 'e' but $parents[] will still try to look for 'Frame'.
To Reproduce
Add $parents["typeName"] references inside page view.
Execute 'tns run --env.uglify'
Expected behavior
Class and Function names should be kept as is and $parents[] references should work properly.
Additional context
In the past, I submitted a bug report regarding this issue in NS repository but I didn't know what the cause of it is. NativeScript/NativeScript#8541
If the following properties are set in TerserPlugin, inside 'terserOptions' and 'compress' objects, problem will be solved.
keep_classnames: true,
keep_fnames: true
The text was updated successfully, but these errors were encountered:
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):CLI: 6.7.4
Cross-platform modules: 6.5.8
Android Runtime: 6.5.1
iOS Runtime: 6.5.1
Plugin(s):
Node.js: 12.16.3
Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack
Describe the bug
When using --env.uglify, Terser Plugin minifies class and function names. As a result, NativeScript's $parents[] references inside XML files are broken since they use component class names to get distant parent (e.g. $parents["Frame"]).
All in all, after minimizing, 'Frame' will be called 'e' but $parents[] will still try to look for 'Frame'.
To Reproduce
Add $parents["typeName"] references inside page view.
Execute 'tns run --env.uglify'
Expected behavior
Class and Function names should be kept as is and $parents[] references should work properly.
Additional context
In the past, I submitted a bug report regarding this issue in NS repository but I didn't know what the cause of it is.
NativeScript/NativeScript#8541
If the following properties are set in TerserPlugin, inside 'terserOptions' and 'compress' objects, problem will be solved.
The text was updated successfully, but these errors were encountered: