I use the v3 plugin with webpack. The Firefox browser console throws a warning stating my js is loaded, but has a wrong mime-type: Het script van ‘http://localhost:3000/’ is geladen, hoewel het MIME-type ervan (‘text/html’) geen geldig JavaScript-MIME-type is.
The warning translates to The script is loaded, although its MIME-type (‘text/html’) is not a valid JavaScript-MIME-type.
The .babelrc:
{
"presets": [ "@babel/preset-env"],
"plugins": [
["babel-plugin-inline-import", {"extensions": [".html"]}]
]
}
The javascript:
import html from './template.html';
console.log(html);
My code works. Webkit browsers don't show this warning, Firefox does though.
I use the v3 plugin with webpack. The Firefox browser console throws a warning stating my js is loaded, but has a wrong mime-type:
Het script van ‘http://localhost:3000/’ is geladen, hoewel het MIME-type ervan (‘text/html’) geen geldig JavaScript-MIME-type is.The warning translates to
The script is loaded, although its MIME-type (‘text/html’) is not a valid JavaScript-MIME-type.The .babelrc:
{ "presets": [ "@babel/preset-env"], "plugins": [ ["babel-plugin-inline-import", {"extensions": [".html"]}] ] }The javascript:
My code works. Webkit browsers don't show this warning, Firefox does though.