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
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
[Karma](http://karma-runner.github.io) preprocessor to resolve ES6 modules.
3
3
4
4
## The problem
5
-
Starting version *unreleased* Karma properly supports ES6 modules when running in a suitable environment. Browsers module implementation is limited however to local modules (i.e. `./foo.js`) and browsers will not resolve path missing extension leaving that to the server.
5
+
Starting version *unreleased* Karma properly supports ES6 modules when running in a suitable environment. Browsers module implementation is limited however to local modules (i.e. `./foo.js`) and browsers will not resolve paths missing extension leaving that to the server.
6
6
7
-
This preprocessor solves both problems by rewriting import declarations in files on the fly and replacing aliased with relative paths as well as adding extensions if necessary.
7
+
This preprocessor solves both problems by rewriting import declarations on the fly and replacing aliased path with relative ones as well as adding extensions if necessary allowing for native ES6 modules testing without compiling or bundling.
8
8
9
9
## Installation
10
10
```bash
@@ -22,8 +22,7 @@ module.exports = (config) => {
22
22
{type:'module', pattern:'alias-root/**/*.js'}
23
23
],
24
24
preprocessors: {
25
-
'test/**/*.js': ['module-resolver'],
26
-
'alias-root/**/*.js': ['module-resolver']
25
+
'test/**/*.js': ['module-resolver']
27
26
},
28
27
moduleResolverPreprocessor: {
29
28
addExtension:'js',
@@ -79,7 +78,7 @@ A function to be called instead of normal rewriting.
79
78
80
79
Takes two arguments:
81
80
* A string containing imported file path,
82
-
* File object for currently processed file containing some meta information, see [karma preprocessor documentation](http://karma-runner.github.io/3.0/dev/plugins.html)
81
+
* File object for currently processed file containing some meta information, see [karma preprocessor documentation](http://karma-runner.github.io/3.0/dev/plugins.html).
0 commit comments