-
Notifications
You must be signed in to change notification settings - Fork 6.8k
require in sidenav's compiled module is pulling in .ts files #189
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
Comments
@robwormald is there a standard approach to dealing with this? |
@jelbourn the basic issue is that code like https://github.com/angular/material2/blob/master/src/components/sidenav/sidenav.ts#L21-L22 , when distributed, is basically manually walking outside the npm distribution. The right fix would be to import from @angular2-material/core, which is obviously a bit more complicated when dev'ing locally. typescript@next supports configuration for this, but i don't think its in a stable release yet, which might not matter. |
@hansl might know more |
https://gist.github.com/robwormald/fa0ad1bd89c098500693 works (adapt as necessary), in ts@next |
The plan: have the release script replace relative path references to core with |
note that @alexeagle is moving angular core to the above style of config as On Thu, Mar 17, 2016 at 7:19 PM Jeremy Elbourn notifications@github.com
|
You can do that, but be careful, it allows you to use eg. On Thu, Mar 17, 2016 at 8:16 PM Rob Wormald notifications@github.com
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Using
alpha.1
withwebpack
you might run into this kind of error:The cause is that the compiled
sidnav.js
anddir.js
tries to require the ts files instead of the compiled js ones.Workaround
Open
dir.js
and locate the line(around line 12) and add the js extension to the req'd module, so it should look like this
Do the same in
sidenav.js
, i.e. make sure you have something like this around line 23-24The text was updated successfully, but these errors were encountered: