diff --git a/lib/middleware/karma.js b/lib/middleware/karma.js
index c48332d12..cabeb2f81 100644
--- a/lib/middleware/karma.js
+++ b/lib/middleware/karma.js
@@ -193,7 +193,11 @@ function createKarmaMiddleware (
} else {
const scriptType = (SCRIPT_TYPE[fileType] || 'text/javascript')
const crossOriginAttribute = includeCrossOriginAttribute ? 'crossorigin="anonymous"' : ''
- scriptTags.push(``)
+ if (fileType === 'module') {
+ scriptTags.push(``)
+ } else {
+ scriptTags.push(``)
+ }
}
}