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

misc: not scaffold 'dist' if the user chooses default #716

Merged
merged 3 commits into from
Jan 3, 2019

Conversation

EvsChen
Copy link
Contributor

@EvsChen EvsChen commented Dec 22, 2018

As mentioned in #708 , we don't need to scaffold the "dist" property in output path if the entry is single and output path is not chosen by the user.

What kind of change does this PR introduce?
misc
Did you add tests for your changes?
N/A
If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?
No

Other information

@webpack-bot
Copy link

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

We will need to do a bit more work here. let outputPath = dist will set dist nonetheless and you will need to move around some logic to check if outputPath is present too. If it is, then set it

@EvsChen
Copy link
Contributor Author

EvsChen commented Dec 22, 2018

Hi @evenstensberg , I don't quite get what you mean by "check if outputPath is present".
If the user specifies output, which means outputTypeAnswer.outputType.length !== 0, it will go into the if block and set the output path.

@evenstensberg
Copy link
Member

Yes it will, but the default output path is dist. What @TheLarkInn is requesting is that we do not set the option at all in the generated configuration file 👍

@EvsChen
Copy link
Contributor Author

EvsChen commented Dec 25, 2018

The dist will not appear in the output. If the user chooses default output and does not input anything, the outputTypeAnswer.outputType.length will be equal to 0 and the output will not be set.

Did I miss some point here? I think the only place that sets the output option is in this if block.

@evenstensberg
Copy link
Member

If you set multiple entries and press enter you can see the default output option being set regardless. Idea is to remove that setting entirely

@EvsChen
Copy link
Contributor Author

EvsChen commented Dec 27, 2018

As what mentioned in #708, I think @TheLarkInn only wants to remove it for the single entry case.

@evenstensberg
Copy link
Member

Webpack will set that property regardless, and it should not be in the generated configuration file if it is set to dist

@webpack-bot
Copy link

@EvsChen Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@evenstensberg Please review the new changes.

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.

None yet

3 participants