Opened 7 years ago

Last modified 6 years ago

#18438 closed defect

Loader only strips strict-mode directive with double quotes — at Version 1

Reported by: Bryan Forbes Owned by: Rawld Gill
Priority: high Milestone: 1.8.11
Component: Loader Version: 1.10.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Bryan Forbes)

Currently, the loader, when configured with stripStrict: true only strips "use strict" and not 'use strict'. The regular expression should be updated to strip the single-quoted version as well. I will be submitting a pull request to address this issue.

I found this issue when writing intern tests. The code coverage instrumentation does not work in strict mode since it accesses global objects and escodegen rewrites "use strict" as 'use strict'.

Change History (1)

comment:1 Changed 7 years ago by Bryan Forbes

Description: modified (diff)
Priority: undecidedhigh
Note: See TracTickets for help on using tickets.