Skip to content

Add an example how to adjust ts-loader settings #12508

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

Merged
merged 1 commit into from
Oct 21, 2019
Merged

Add an example how to adjust ts-loader settings #12508

merged 1 commit into from
Oct 21, 2019

Conversation

Steveb-p
Copy link
Contributor

@Steveb-p Steveb-p commented Oct 18, 2019

@javiereguiluz
Copy link
Member

@Lyrkan could you please review this proposed change? Thanks!

Copy link
Contributor

@Lyrkan Lyrkan left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Only (really) minor concern: I wonder if it would also be clear for newcomers that the whole callback thing is optional and they can just call .enableTypeScriptLoader() without any parameter.

In Encore's index.js' comments we usually show both versions to avoid any ambiguity... but maybe I'm worrying about nothing :)

@Steveb-p
Copy link
Contributor Author

Steveb-p commented Oct 18, 2019

@Lyrkan current page already has an example just above the one that this PR adds, where there is no parameter. I had considered it sufficient, as it is a continuation of the example.

I'll adjust it into a diff instead to clearly show that it's an optional parameter that is only required if a specific ts-loader adjustment is needed.

EDIT: ccb694d should do the trick.

@Lyrkan
Copy link
Contributor

Lyrkan commented Oct 18, 2019

@Lyrkan current page already has an example just above the one that this PR adds, where there is no parameter. I had considered it sufficient, as it is a continuation of the example.

Oh, my bad then, I didn't expand the top part of the file :)

I'll adjust it into a diff instead to clearly show that it's an optional parameter that is only required if a specific ts-loader adjustment is needed.

Good idea!

@javiereguiluz javiereguiluz added this to the 3.4 milestone Oct 21, 2019
@javiereguiluz javiereguiluz changed the base branch from 4.3 to 3.4 October 21, 2019 15:56
javiereguiluz added a commit that referenced this pull request Oct 21, 2019
This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes #12508).

Discussion
----------

Add an example how to adjust ts-loader settings

https://symfony.com/doc/current/frontend/encore/typescript.html - show how to set up custom `ts-loader` options. Sample comes from `index.js`.

https://github.com/symfony/webpack-encore/blob/f5a17a47b5fcd23ff991bd7154385185c7f54e2f/index.js#L956-L979

Commits
-------

65ce135 Add an example how to adjust ts-loader settings
@javiereguiluz javiereguiluz merged commit 65ce135 into symfony:3.4 Oct 21, 2019
@javiereguiluz
Copy link
Member

Paweł, thanks for improving these docs. We merged this in 3.4 branch. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants