Skip to content

Commit

Permalink
Use SystemJS baseURL instead of relying on proxy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
computmaxer committed Sep 29, 2014
1 parent 9f196b1 commit c14be8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ jspm: {
}
```

The proxy configuration tells Karma to rewrite the requests for `/jspm_packages/...` to `/base/jspm_packages/...` so that karma knows how to serve the files that jspm/systemjs will try to load.

```js
proxies: {
'/jspm_packages/': '/base/jspm_packages/'
}
```

That's it!


Expand Down
9 changes: 7 additions & 2 deletions src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@
"or by running 'jspm dl-loader'.");
}

// Configure SystemJS baseURL
System.config({
baseURL: 'base'
});

// Load everything specified in loadFiles
karma.config.jspm.expandedFiles.map(function(modulePath){
// Prepend base to each path. Karma serves files from /base/
promises.push(System.import('base/' + extractModuleName(modulePath)));
promises.push(System.import(extractModuleName(modulePath)));
});

// Promise comes from the es6_module_loader
Expand Down

0 comments on commit c14be8a

Please sign in to comment.