frankwallis / WebpackAspnetMiddleware

Webpack development middleware for ASP.NET 5
50 stars 7 forks source link

Replaced hardcoded environment names with extensible option #12

Closed ArsalanWork closed 6 years ago

ArsalanWork commented 6 years ago

Until this proposal gets merged and released, users may temporarily fix it by passing the actual environment name in WebpackDevMiddlewareOptions.EnvironmentVariables dictionary.

frankwallis commented 6 years ago

Thanks for this I would like to merge but I don't have enough context to know if it is a breaking change?

Are there default values provided for EnvironmentName.Development?

It is important when using react that NODE_ENV has the correct value as it is used to keep the bundle size down.

Also related to this is the new webpack 4 mode option. Should this come from Hosting environment too?

Would be interested to work through some use cases so I can provide a recommended setup.

frankwallis commented 6 years ago

Many thanks for this, it is now released in 2.2.4