Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

baseURL not prepending in 0.17 #394

Closed
milesj opened this issue Jun 9, 2015 · 3 comments
Closed

baseURL not prepending in 0.17 #394

milesj opened this issue Jun 9, 2015 · 3 comments

Comments

@milesj
Copy link

milesj commented Jun 9, 2015

Just upgraded to version 0.17 and started updating my code to support the recent changes, mainly the automatic JS extension portion. However, I've noticed that my System.baseURL setting is no longer working.

In my setup, I have System.baseURL set to /base/js-es6/ (to support Karma paths). As an example, say I have a file foo.js that has an import Bar from 'bar'. This bar will be resolved to bar.js and the loader will attempt to load it at the following address http://localhost:9876/bar.js. This is wrong, as it should load from http://localhost:9876/base/js-es6/bar.js.

Is there an extra step I need to take to support the 0.17 changes? Or is this a bug that was introduced?

@guybedford
Copy link
Member

@milesj yes baseURL has been removed from this implementation.

Instead you can use the wildcard path here - System.paths['*'] = '/base/js-es6/*'.

baseURL is only a feature of SystemJS now as it was removed from the spec.

@milesj
Copy link
Author

milesj commented Jun 9, 2015

It wasn't mentioned in the changelog on the release and was still mentioned within the readme/wikis. I'll give it a whirl using paths, thanks!

@milesj milesj closed this as completed Jun 9, 2015
@probins
Copy link
Contributor

probins commented Jun 9, 2015

see #395

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants