Skip to content

Commit

Permalink
Merge 9b4a309 into 05dc288
Browse files Browse the repository at this point in the history
  • Loading branch information
jehon committed Nov 13, 2020
2 parents 05dc288 + 9b4a309 commit 2b0c201
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/middleware/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ function createKarmaMiddleware (
} else {
const scriptType = (SCRIPT_TYPE[fileType] || 'text/javascript')
const crossOriginAttribute = includeCrossOriginAttribute ? 'crossorigin="anonymous"' : ''
scriptTags.push(`<script type="${scriptType}" src="${filePath}" ${crossOriginAttribute}></script>`)
if (scriptType === 'module') {
scriptTags.push(`<script onerror="throw 'Error loading ${filePath}'" type="${scriptType}" src="${filePath}" ${crossOriginAttribute}></script>`)
} else {
scriptTags.push(`<script type="${scriptType}" src="${filePath}" ${crossOriginAttribute}></script>`)
}
}
}

Expand Down

0 comments on commit 2b0c201

Please sign in to comment.