-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping overrides default extension #524
Comments
You'll need to separately add the |
Thanks for your fast reply. I tried this, by updating my config to: System.config({
transpiler: 'typescript',
packages: {
'/src': {
main: 'app',
defaultExtension: 'ts'
},
'/node_modules/angular2/node_modules/rx': {
main: 'index',
defaultExtension: 'js'
},
'/node_modules/angular2': {
main: 'angular2',
defaultExtension: 'js',
map: {
'rx': './node_modules/rx'
}
}
},
map: {
// Added a path for ng2 because internal they require modules as 'angular2/src/...'
angular2: '/node_modules/angular2/',
typescript: '/lib/typescript@v1.5-beta2/bin/typescript.js'
}
}); I can correctly target the Rx package now (thank you for that!). However, all If I update the default extension to
|
Can you share a test case here? |
Working on it! If you have time, you could already verify the issue by cloning my repo, running npm install and then just open up the index file. I don't have a lot of time left today, so might be postponed to tomorrow. Thanks for the quick assistance. |
Let me know if you need any further assistance here. |
I'm trying to get System.js to play along with Angular2 and the new typescript transpiler option (introduced in 0.17). However I can't seem to get the mapping correctly.
I have angular2 installed under my
node_modules
, while I have my sources undersrc
. This is my System.js configuration:As you can see I'm trying to make use of the new packgaes configuration to set the default extension per package. This works great, except for one issue: somewhere in the code the
rx
is required by Angular2. Without the mapping configuration, System.js tries to resolve the Rx package on the pathWhich is obviously wrong. With the mapping in place, the package is correctly located, but
require
s are no longer automatically postfixed with my default extension. So I get a bunch of 404s regarding the requires in the Rx package.Am I doing anything wrong here? You can find the code on this Github repository of mine
The text was updated successfully, but these errors were encountered: