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 }}
Repository navigation
Cannot combine selfDefending and target: browser-no-eval #610
The self defending template relies on constructing a new function, which is incompatible in environments that prevents eval-like functionality from running, for example when using a strict CSP. Normally, one would use target: "browser-no-eval" to prevent eval-like functionality from being included in the output, but selfDefending: true will be applied even though this target is chosen.
Expected Behavior
I see two possible options here:
The configuration validation fails and notifies the user that these two options are incompatible with each other
The self defending template is updated to be compatible with the browser-no-eval target
Current Behavior
The application ignores that the two options are incompatible with each other and outputs eval-like code even though eval-like behavior has been opted out by the user.
Activity
sanex3339 commentedon May 31, 2020
Will fix it soon by adding a separate code for self-defending with
browser-no-eval. It will more noticeable, but this is a cost.Added correct `self-defending` code for `target: 'browser-no-eval'`
Added correct `self-defending` code for `target: 'browser-no-eval'` (#…
sanex3339 commentedon May 31, 2020
Released as
0.28.4. Please try it and create another issue if the problem still here.patriksletmo commentedon Jun 1, 2020
Awesome, thank you!