Opened 7 years ago

Closed 6 years ago

#18438 closed defect (fixed)

Loader only strips strict-mode directive with double quotes

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 (3)

Note: See TracTickets for help on using tickets.