Webpack-cli: Feature(config-test): Evaluating the webpack configs.

Created on 23 Mar 2019  路  13Comments  路  Source: webpack/webpack-cli

Is your feature request related to a problem? Please describe.
Webpack has a steep learning curve, I still remember those difficulties I have faced in my early days with webpack when my webpack config didn't works as I expected it to be.

Describe the solution you'd like
Creating a cli package called test, which takes the webpack config -> Analyzes it. It will log the error in the config if any. Not only this, the main feature of this package would be that it shows warning if you are doing something wrong. Something wrong means your webpack config could work but you can make some tweaks (which the webpack suggests) in your config in order to get the best performance.

This could be a game changer if paired with the upcoming cli UI.

It's like eslint on configs.

Describe alternatives you've considered

  • Create a separate package, if it doesn't exist.

Additional context

webpack test webpack.config.js

  • Errors in the config if any
  • You can use this instead of that......

Can't say about its scope, so let's discuss :fire:

Feature Request Help Wanted Low Up for planning enhancement

Most helpful comment

Config evaluation in sep feat

All 13 comments

yes let's do this

just use webpack validate schema for checking

Can't this be a part of https://github.com/webpack/webpack-cli/issues/588 which will essentially do both -

  • Validate the config
  • Stress the library for edge cases

So we'll get both functionalities out of it, but yeah a separate package will be a more external thing which people can use to validate their configs. 馃憤

Config evaluation in sep feat

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

For the config evaluation, we could do the following:

  1. Same syntax as apachectl test
  2. Use validation schema and output warn to console

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

Core already does the schema validation of the config passed, do we need this?
/cc @evilebottnawi

I think test command will be great, it is very easy to implement

something like webpack --test-config webpack.config.js ?

no, it should be command

webpack configtest ./webpack.config.js
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sumukhah picture sumukhah  路  3Comments

sam-s4s picture sam-s4s  路  5Comments

luillyfe picture luillyfe  路  4Comments

r00nscapenab picture r00nscapenab  路  4Comments

AjayPoshak picture AjayPoshak  路  5Comments