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

WebpackApplicationBuilderExtensions.UseWebpack not an extension method #8

Closed
PerfectlyNormal opened this issue Sep 19, 2018 · 1 comment
Labels

Comments

@PerfectlyNormal
Copy link
Contributor

Hi

I've been using this project a little while now, and it works very well.

One thing I had a bit of trouble figuring out was why UseWebpack wasn't an extension method? Now I'm forced to use it like WebpackApplicationBuilderExtensions.UseWebpack(app, withDevServer: env.IsDevelopment());, instead of the more common app.UseWebpack(withDevServer: env.IsDevelopment());

Is there any particular reason, or just an oversight?

@sergeysolovev
Copy link
Owner

@PerfectlyNormal

Hello! Thanks you for your feedback! It was intended to work as an extension method, but there seems to be a typo.

I think the reason is missed this before the first parameter in the line

public static IApplicationBuilder UseWebpack(IApplicationBuilder app, bool withDevServer)

https://github.com/sergeysolovev/webpack-aspnetcore/blob/master/src/Webpack.AspNetCore/Extensions/WebpackApplicationBuilderExtensions.cs#L18

I would love to see a PR fixing this typo.

PerfectlyNormal added a commit to PerfectlyNormal/webpack-aspnetcore that referenced this issue Sep 25, 2018
AddWebpack was not an extension method on IApplicationBuilder,
forcing an uncommon syntax in order to use it as the README indicates.

Fixes sergeysolovev#8
sergeysolovev pushed a commit that referenced this issue Sep 25, 2018
AddWebpack was not an extension method on IApplicationBuilder,
forcing an uncommon syntax in order to use it as the README indicates.

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

No branches or pull requests

2 participants