Skip to content

Commit

Permalink
Fix for: Instrumentation fails if CSP 'unsafe-eval' is not set
Browse files Browse the repository at this point in the history
This PR fixes it for me; alternatively: Is there a way to pass options directly to the Istanbul plugin?
  • Loading branch information
fjf2002 authored Apr 22, 2022
1 parent 69d837a commit 2e6f3ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export = function istanbulPlugin(opts: IstanbulPluginOptions = {}): Plugin {
excludeNodeModules: true,
});
const instrumenter = createInstrumenter({
coverageGlobalScopeFunc: false,
coverageGlobalScope: 'window',
preserveComments: true,
produceSourceMap: true,
autoWrap: true,
Expand Down

0 comments on commit 2e6f3ab

Please sign in to comment.