You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running karma start karma.conf.js --single-run should run test correctly.
Actual behaviour
When karma is compiling the source, I assume using webpack, this error is returned:
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| <!-- <div modal="ModalClass">
| <div class="modal-header">
| <h3 class="modal-title">Some Title</h3>
@ ./project/static/scripts/applications/app.js 68:22-69
@ ./project/static/scripts/test-context.js
And it shows for every template imported as
importtemplatefrom'./html/template-name.html';
Environment Details
Karma version (output of karma --version):
Karma version: 3.1.1
Relevant part of your karma.config.js file
Steps to reproduce the behaviour
above ^
The odd thing is that if I change the webpack configuration to export an object instead of a function then it works. Any ideas how to make it work with a webpack function config?
The text was updated successfully, but these errors were encountered:
Expected behaviour
Using:
A webpack config such as:
And a karma config such as:
Running
karma start karma.conf.js --single-run
should run test correctly.Actual behaviour
When karma is compiling the source, I assume using webpack, this error is returned:
And it shows for every template imported as
Environment Details
karma --version
):Karma version: 3.1.1
karma.config.js
fileSteps to reproduce the behaviour
above ^
The odd thing is that if I change the webpack configuration to export an object instead of a function then it works. Any ideas how to make it work with a webpack function config?
The text was updated successfully, but these errors were encountered: