-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
webpack-cli v4 beta feedback and changes #1222
Comments
Hello, I tested beta2 unintentionally with my students very quickly 2 days ago (In fact I didn't notice until they told me that the options I asked them to use were throwing errors, when I realized 4.0.0-beta2 had just been published I told them to downgrade to make my exercise work ! 😄 ) Not a big deal but even if I understand the point of having clean and concise Anyway, thanks for the great work here 👏 |
Hey ho 👋 Removing some of the flags is a good idea 👍 But there are two features I really use a lot that are currently not implemented in v4:
The
Is this a bug or are you planning to drop support for TypeScript configs? Using TS in webpack configs is really nice because of Intellisense and type checking. I'm going to present both features in my upcoming talk next week at the Frontend Developer Love Conference in Amsterdam and I don't want to advertise deprecated features 😁. |
Hi, Following @jhnns message, using a file Are support for babel and typescript been made opt-in using peer-dependencies? |
Seamless support for typescript and babel is not deprecated, it was a bug. We're working on restoring these features :) |
@ematipico
|
Thank you @exKAZUu , I will check this out |
@exKAZUu the latest beta should work now! |
Confirmed. Thanks! |
I second @jhnns comment on the --env parameter. It's pretty handy for single file configs and should be kept in my opinion. |
For example: |
@mstssk Can you open a new issue with reproducible test repo? |
@evilebottnawi Thank you. I wrote #1581 |
I am trying to write my
but the v4 beta doesn't seem to recognize it. Does this syntax no longer work? i was wanting to read env vars in my webpack config file, is there some other way to get access to env vars in the config? also, i'm enjoying the new features. the |
/cc @webpack/cli-team Need to add test with config like a function |
On it 💯 |
@evilebottnawi we should add the env flag, comes in handy in case of single config which performs differently as per the env. |
+1 for |
Go ahead |
WIP |
There is a warning when webpack-cli v4 is used with webpack v5:
➤ YN0000: ┌ Resolution step |
It is expected, after stable release no warnings |
dir
webpack.config
whie I run
when I del the index.js, It's OK
|
Hi @Toge66 thanks for your feedback! To me it looks like a bug in the beta release but it doesn't seem to happen now in the latest branch so I've added a test for your case in #1718. Maybe @evilebottnawi we should tag a new release since it's been quite long since the last version was tagged and a lot of work as gone in. |
@anshumanv Yes, we need to do the new release, I think we can do it at the new week |
|
@Demivan we have PR on this |
Hi! I get a problem when using webpack-cli@4.0.0-beta.8 in Github Action. It seems that this is not a tty https://github.com/axetroy/anti-redirect/pull/271/checks?check_run_id=952326284
|
@axetroy This is fixed but not yet released. |
@snitin315 I found that the latest version was released on March 2. Can you let me known me about when the new version will be released? Because I used webpack-cli@v4 in my project. CI is not passed and I cannot release a new version. It will depend on whether I want to downgrade to webpack-cli@v3. Thx |
/cc @evilebottnawi can you do a release? |
Hey, Few days ago I wanted to try out webpack 5 and newest webpack/cli, most of the migration went well except it seems like I cannot change stats output. I've created simple test project:
Whenever I build it the stats look like this:
I really like the new format but I got few issues with it. First, I was unable to clean it up a bit, I've tried to use all sort of options from stats config but the output is always the same. Another thing is it doesn't show that it emited 2 files, it only shows entrypoint. I am not sure how much work in progress it is so any information would be appreciated.
I tried loking in other issues in this repo or webpack but haven't found anything useful on my own. Thanks! |
We will try to do the next release on this week |
Any update on a new beta release? |
@webpack/cli-team friendly ping, we need to finish PRs |
Please, please reconsider having This issue came up back when webpack v4 was in beta. There's nothing wrong with In an empty project, |
@billyjanitsch Are you sure about |
@evilebottnawi that website is only tracking the size of direct dependencies. For example, it shows Try this:
You get:
|
@billyjanitsch can you run |
@evilebottnawi yes, no problem: Expand
|
Can we have the default folder name as Webpack config is an important part of any app that uses it, so we should (IMHO) use a not-dotted folder them so they're not hidden by the OS. |
@mustafawm you can use any directory name and use |
|
Hi @dmurvihill, we added You can do
if(environment === "staging") {
return { ... }
} |
my suggestion is not to have staging config at all. the staging config should be prod. |
About v4
With webpack-cli
v4
we will support only webpackv5
and possiblyv4
but not officially, so if there are any problems we suggest to usev3.*
if you still want to keep the best compatibility.We dropped Node.js 8 from our CI. We support at least Node.js 10.
What's changing
Less arguments
We drastically reduced the number of arguments that we support. This is because we think most of them are not used by anyone (or used inside a configuration file). Run
To check the arguments supported.
If you think that we wrongly removed an argument that you thought it was useful, please leave a comment here and we can discuss its implementation. (add a 👍 if someone already requested an argument you need)
.webpack
folder supportThe CLI now supports the
.webpack
folder by default. This feature is still in beta so it would be great if people could start using it. Files that are automatically imported:.webpack/webpack.config.dev
.webpack/webpack.config.prod
.webpack/webpackfile
webpack.config
Changed default output
We wanted to change a bit the output emitted via CLI.
Don't worry, you can still go to the old output using the
--standard
flag.Arguments
--dev
and--prod
Now you can pass the mode to the compiler using these two simple arguments.
Help for single arguments
Running the following command
webpack help --dev
Will output
Usage: webpack --dev Description: Run development build Documentation: https://webpack.js.org/concepts/#mode
The text was updated successfully, but these errors were encountered: