I have started learning webpack and have created a small project to see how it works. I am following this tutorial.
I have a .js file that I bundle togheter with webpack and display some text with function and jquery. A problem I have is this.
With this .js file
$ = require('jquery');
require('./dependentscript');
//import '../css/TestSheet.css';
document.getElementById("fillme").innerHTML = myfunction();
$('#fillmewithquery').html('This is some jquery text');
and Index.html
<body>
<h1>Entry point</h1>
<p id="fillme"></p>
<div id="fillmewithquery"></div>
<script src="~/js/bundle.js"></script>
</body>
But when I uncomment my import TestSheet.css
I get this.
Why is some of my .js file functioning and why does jquery stop working?