Skip to content

fix(@ngtools/webpack): analyze the typescript file for additional dep… - #7998

Merged
hansl merged 1 commit into
angular:masterfrom
hansl:dependencies
Oct 11, 2017
Merged

fix(@ngtools/webpack): analyze the typescript file for additional dep…#7998
hansl merged 1 commit into
angular:masterfrom
hansl:dependencies

Conversation

@hansl

@hansl hansl commented Oct 10, 2017

Copy link
Copy Markdown
Contributor

…endencies

By default, Webpack only add dependencies it can see. Types or imports that are not
kept in transpilations are removed, and webpack dont see them. By reading the AST
directly we manually add the dependencies to webpack.

Fixes #7995.

Comment thread tests/e2e/tests/build/rebuild-types.ts Outdated

export default async function() {
if (process.platform.startsWith('win')) {
return Promise.resolve();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be able to just return; here. An async function will return a resolved promise with the returned value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You’re right. Thanks

filipesilva
filipesilva previously approved these changes Oct 11, 2017
await execAndWaitForOutputToMatch('ng', ['serve'], successRe);

await Promise.all([
waitForAnyProcessOutputToMatch(successRe, 20000),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the PR LGTM but this test fails with the new plugin (Angular 5+).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it should, I need to fix that code path. Going to do that right now.

@hansl
hansl force-pushed the dependencies branch 2 times, most recently from 1ce0ee1 to b0a5641 Compare October 11, 2017 17:52
…endencies

By default, Webpack only add dependencies it can see. Types or imports that are not
kept in transpilations are removed, and webpack dont see them. By reading the AST
directly we manually add the dependencies to webpack.

Fixes angular#7995.
@hansl

hansl commented Oct 11, 2017

Copy link
Copy Markdown
Contributor Author

I confirmed (running nightly tests locally) that this work with the latest angular compiler.

@hansl
hansl merged commit b4d49f2 into angular:master Oct 11, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Oct 12, 2017
hansl pushed a commit that referenced this pull request Oct 12, 2017
hansl pushed a commit that referenced this pull request Oct 12, 2017
hansl pushed a commit that referenced this pull request Oct 12, 2017
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this pull request Apr 23, 2018
@hansl
hansl deleted the dependencies branch November 28, 2018 23:34
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular-cli doesn't watch for ALL files correctly.

4 participants