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

add doc about target as a function #1262

Merged
merged 5 commits into from
Jul 2, 2017
Merged

add doc about target as a function #1262

merged 5 commits into from
Jul 2, 2017

Conversation

jchip
Copy link
Contributor

@jchip jchip commented May 31, 2017

No description provided.

Copy link
Contributor

@bebraw bebraw left a comment

Choose a reason for hiding this comment

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

If possible, it would be good to mention when you might want to use the function (use cases).


Tells webpack which environment the application is targeting. The following values are supported via [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsApply.js):
Tells webpack which environment the application is targeting. If it's a `function`, then it will be called with the compiler as a parameter. If it's a `string`, then the following values are supported via [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsApply.js):
Copy link
Collaborator

Choose a reason for hiding this comment

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

The "following values are supported" is now dangling due to the inserted paragraph. Maybe move the paragraph on the function type below the table?

Copy link
Collaborator

@skipjack skipjack left a comment

Choose a reason for hiding this comment

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

Made some minor changes to make the document flow a little better.

@skipjack skipjack merged commit 7270a60 into webpack:master Jul 2, 2017

If a function is passed, then it will be called with the compiler as a parameter. Set it to a function if none of the predefined targets from the list above meet your needs.

For example, if you don't want any of the plugins they applied:

Choose a reason for hiding this comment

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

they here seems unwarranted, just pointing it out.

cc @skipjack @jchip

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to send a PR if it still exists

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.

6 participants