-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Use application tsconfig file for indexTransform and customWebpackConfig #879
Conversation
Hi. First of all thanks for your contribution - it is highly appreciated! |
Hey, thanks for the contribution. |
@@ -42,6 +42,7 @@ | |||
"@angular-devkit/core": "^11.0.0", | |||
"lodash": "^4.17.15", | |||
"ts-node": "^9.0.0", | |||
"tsconfig-paths": "^3.9.0", |
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.
I am currently merging part of your changes into my PR (#824) and adding tsconfig-paths
was not needed. Why are you adding it, are there any benefits?
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.
As far as I remember ts-node
does not support paths
property, so if you want to have the exact same config (including paths) for your webpack (or index) configuration you need this one.
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.
Makes sense! But ts-node
isn't needed for any Angular project since it compiles through tsc
and does not require to be "started" through Node, so I wouldn't add this or do I miss any usecase here?
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.
ts-node
is indeed not needed for Angular app, because Angular compiler (not exactly tsc
) builds it, that's correct.
However, index transform and webpack config are not part of the app, they are part of the build chain, which in our case is custom-webpack
builder. The builder needs ts-node
in order to understand the TS syntax of the files it loads (webpack config and index transform).
Hi, About the documentation, I have no improvement idear. |
b1c8c3a
to
5d8194c
Compare
@muuvmuuv @michelherv I appreciate the effort and thank you both, but currently we have two PRs that do practically the same. Can we please have a single PR that takes the best of the existing PRs? |
Hey, sorry it takes me so long to respond, I'm trying to make the
I'll take a look at tests and leave my comments as a review. |
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.
Looks good overall. But I think we also need a test that makes sure indexTransform
uses the app config as well.
packages/custom-webpack/examples/full-cycle-app/tsconfig.base.json
Outdated
Show resolved
Hide resolved
packages/custom-webpack/examples/full-cycle-app/tsconfig.app.json
Outdated
Show resolved
Hide resolved
Here it is: actions/checkout#298 |
Seems like there is a workaround. I'll try to apply it. |
Aaaand fixed! |
@michelherv are we good to go? Can this be merged? |
Hi @just-jeb , it is ok now for merging. Sorry for the late, I was very busy these last days. According @muuvmuuv suggestions :
The others suggestions are also very important. I think we should have to treat them as real independent improvements which will be keep anyway independently of this PR. They would can be merge before or after this PR. It it why I opened the PR #925 |
@@ -50,7 +53,6 @@ | |||
"optimization": true, | |||
"outputHashing": "all", | |||
"sourceMap": false, | |||
"extractCss": true, |
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.
Option
"extractCss"
is deprecated: Deprecated since version 11.0. No longer required to disable CSS extraction for HMR.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The application's
tsconfig
is ignore. Accordingly,indexTransform
andcustomWebpackConfig
cannot use project configuration for custom modules for exampleIssue Number: #607 #749
What is the new behavior?
The application's
tsconfig
is now use.indexTransform
andcustomWebpackConfig
can now use all the application resources.Does this PR introduce a breaking change?
Other information