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

Feature(config-test): Evaluating the webpack configs. #803

Closed
pranshuchittora opened this issue Mar 23, 2019 · 13 comments · Fixed by #2303
Closed

Feature(config-test): Evaluating the webpack configs. #803

pranshuchittora opened this issue Mar 23, 2019 · 13 comments · Fixed by #2303

Comments

@pranshuchittora
Copy link
Member

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 🔥

@evenstensberg
Copy link
Member

yes let's do this

@evenstensberg
Copy link
Member

just use webpack validate schema for checking

@anshumanv
Copy link
Member

Can't this be a part of #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. 👍

@evenstensberg
Copy link
Member

Config evaluation in sep feat

@webpack-bot
Copy link

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.

@evenstensberg
Copy link
Member

For the config evaluation, we could do the following:

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

@ematipico ematipico removed this from the Q2 - Planning milestone Jan 15, 2020
@webpack-bot
Copy link

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.

@webpack-bot
Copy link

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.

@anshumanv
Copy link
Member

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

@alexander-akait
Copy link
Member

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

@snitin315
Copy link
Member

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

@alexander-akait
Copy link
Member

no, it should be command

@alexander-akait
Copy link
Member

alexander-akait commented Oct 30, 2020

webpack configtest ./webpack.config.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
webpack-cli new interface
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

7 participants