-
Notifications
You must be signed in to change notification settings - Fork 12k
Add project source dir as a module solution #2210
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
Conversation
This seems to only work with /src/
login/ # root module for checking auth, otherwise showing a signin/signup page
app/ # the actual app, only displayed when auth'ed I think that we should have some kind of wildcard mapping, such that Maybe we need a module registry in the |
i have tested bdb1953 and its works |
@abner please update your branch |
OK @k1ng440 , it is updated now. |
There is a plan to merge it soon? Just asking because if is not going to be merged we will change our projects to temporarily reference a local version of angular-cli |
"baseUrl": ".", | ||
"paths": { | ||
"@<%= prefix %>/*": ["app/*"], | ||
"app/*": ["app/*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the blueprint, including just @app
might be a good idea to keep things simple. More of a preference thing though, i suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, thinking about it a little bit. It might be better to just add support for paths
and add defaults in a follow-up PR. Many people that want this will most likely customize anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i will change to just get the paths defined in the tsconfig.json applied to webpack resolve without defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just removed this from the blueprint tsconfig.json
I'm not sure this feature is actually a net good idea. I just wrote a comment about it in a similar item linked below. I'm not sure whether in the overall trade-off this is good or bad, but I think it's worthy of discussion before going in. |
@kylecordes, I think adding support for typescript's |
Look at examples in #2254 |
changed the blueprint tsconfig.json to not have any path or baseUrl by default; |
@@ -12,11 +12,6 @@ | |||
"target": "es5", | |||
"typeRoots": [ | |||
"../node_modules/@types" | |||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the baseUrl and paths setup was actually removed from the blueprint tsconfig.json, beside the erroneous commit message. 😄
I'm so happy with this PR. Hope this will be merged soon, because this is the only thing blocking us from upgrading to the webpack version! |
@rolandoldengarm me too. |
@abner, you might want to squash commits and clean up the commit message to simplify a review. |
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
4425b4d
to
e6deb5e
Compare
CLAs look good, thanks! |
To be clear, this PR simply adds support to the I remember we had this at a point, but for some reason took it out. Maybe it was broken at the time. @hansl @TheLarkInn can you review? Both preferably. |
e6deb5e
to
f5e47ba
Compare
f5e47ba
to
2477e94
Compare
We're moving away from using |
Superseded by #2470. |
@filipesilva I want to able to import like this, what I config before using it? I saw suggestion about this usage everywhere in this repo but nothing official about how to config. |
@craigcosmo you can use the tsconfig |
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. |
Adding resolve alias
@prefix
andapp
to webpack config and addingpaths
@prefix
andapp
to tsconfig.json. I think it fixes #1465This allows to import app modules using
or