Skip to content
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

Update light build targets to include Typescript extensions #2075

Merged
merged 1 commit into from Jan 12, 2019
Merged

Update light build targets to include Typescript extensions #2075

merged 1 commit into from Jan 12, 2019

Conversation

itsjamie
Copy link
Collaborator

@itsjamie itsjamie commented Jan 10, 2019

This fixes an issue where light-dist / light defined their own resolve property causing them to not get the base config resolve for extensions, etc.

Includes a few minor lint fixes that popped in my editor as well.

Before:

Before

After:

After

  • changes have been done against master branch, and PR does not conflict

@itsjamie
Copy link
Collaborator Author

@tchakabam I think you've worked a lot on this, do you see any issues with this change? What prompted me looking was the build failures on light and light-dist when I added a typescript file without the extension for buffer-controller.

@itsjamie itsjamie mentioned this pull request Jan 10, 2019
3 tasks
@itsjamie
Copy link
Collaborator Author

Link #2070

tjenkinson
tjenkinson previously approved these changes Jan 10, 2019
Copy link
Member

@tjenkinson tjenkinson 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

webpack.config.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@johnBartos johnBartos left a comment

Choose a reason for hiding this comment

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

Should we just use webpack-merge? https://github.com/survivejs/webpack-merge

It's called out in the official webpack docs https://webpack.js.org/guides/production/

@tjenkinson
Copy link
Member

@johnBartos that package looks nice but brings in more dependencies, and what is here now is essentially the same thing ¯_(ツ)_/¯

@johnBartos
Copy link
Collaborator

True. We could also be more minimal and just add the extensions array to the returned value of getAliasesForLightDist

@itsjamie
Copy link
Collaborator Author

I'm all for the smallest change possible that fixes the issue. I reverted the deep-merge in favour of simply defining the extensions array on the two light targets.

My 2c would be if continues to be an issue going forwarded to maintain the simple approach, webpack-merge library seems to be a good option. It does seem to do some nice things with regards to loaders etc that wouldn't make sense to write again. Thanks @johnBartos @tjenkinson.

@itsjamie itsjamie changed the title Changes clone function used in webpack config to be a deep merge. Update light build targets to include Typescript extensions Jan 10, 2019
tjenkinson
tjenkinson previously approved these changes Jan 11, 2019
Copy link
Member

@tjenkinson tjenkinson left a comment

Choose a reason for hiding this comment

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

I actually would prefer a more generic solution (previous commit or merge lib) over this one off fix, but this works

Copy link
Member

@michaelcunningham19 michaelcunningham19 left a comment

Choose a reason for hiding this comment

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

👍

@itsjamie
Copy link
Collaborator Author

Squashed history down to just the generic webpack-merge implementation. It does do some good things where it will deep-merge loader arrays, and is the webpack approved solution for this problem, so I went with that.

Thanks everyone.

@itsjamie itsjamie mentioned this pull request Jan 11, 2019
3 tasks
@michaelcunningham19
Copy link
Member

Merging to unblock #2073 and #2076

Travis CI shows the webpack build succeeds without file resolution errors

@michaelcunningham19 michaelcunningham19 merged commit 7021254 into video-dev:master Jan 12, 2019
@itsjamie itsjamie deleted the update-webpack-merge branch January 13, 2019 00:23
@johnBartos johnBartos added this to In progress in Typescript Integration via automation Aug 13, 2019
@johnBartos johnBartos added this to the 0.13.0 milestone Aug 13, 2019
@itsjamie itsjamie moved this from In progress to Reviewer approved in Typescript Integration Aug 28, 2019
@itsjamie itsjamie moved this from Reviewer approved to Done in Typescript Integration Aug 28, 2019
@robwalch robwalch added this to Done in 0.13.0 Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
0.13.0
  
Done
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants