Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

The Future of this Plugin vs. Mini CSS Extract Plugin (=> Use Mini CSS Extract Plugin) #749

Closed
garygreen opened this issue Mar 16, 2018 · 12 comments

Comments

@garygreen
Copy link

garygreen commented Mar 16, 2018

The last release was nearly a month ago.

Could we have some official responses and guidance from the maintainers please.

@alexander-akait
Copy link
Member

alexander-akait commented Mar 16, 2018

@garygreen here, some problems very difficult to fix and somebody of us don't have many time. Mini Css Extract Plugin is PoC future webpack build-in css support and yes for webpack@4 it is the best choice than ETWP. ETWP have a lot of arch issues for historical reasons. PR welcome if you know how fix any issue(s) from you above issue.

P.S. I can take care about this only through 2 week.

@garygreen
Copy link
Author

garygreen commented Mar 16, 2018

Mini Css Extract Plugin is PoC future webpack build-in css support
ETWP have a lot of arch issues for historical reasons. PR welcome if you know how fix any issue(s) from you above issue.

It doesn't make sense to contribute to a plugin which, by the sounds of it, is becoming redundant?

If the official aim is to have css extraction built into Webpack thru the Mini Extract plugin, should support for Webpack 4 not be phased out of ETWP? If this was official, it would clear up all the Webpack 4 issues in this repository and also create a clear direction for where things should be heading.

@alexander-akait
Copy link
Member

@garygreen plugin just don't support webpack@4 but for webpack@3 it is good solution for extract. Mini Css Extract Plugin only works for webpack@4, we should still support this plugin, because many of people still use webpack@3. Official aim will be ship with webpack@4 docs and roadmap.

@alexander-akait
Copy link
Member

Anyway we are open for PR to support webpack@4 before css will be support in webpack.

@garygreen
Copy link
Author

garygreen commented Mar 16, 2018

I wasn't suggesting dropping support for webpack@3, of course it's still will be supported.

Official aim will be ship with webpack@4 docs and roadmap.
Anyway we are open for PR to support webpack@4 before css will be support in webpack.

This is giving mixed signals. You either should 1) move in a direction to support Mini Css Extract, or 2) work alongside it and dilute the community/development of both plugins. Option 2 is one you are suggesting, and it's not a good one, IMO.

These are steps I believe would help move things in the right direction:

  • State in the Readme that ETWP only supports webpack@3 (there are too many bugs even in the beta version to encourage users to use it)
  • Add a link to the Mini Css Extract Plugin for webpack@4 users and encourage support of the plugin there.
  • Close issues relating to webpack@4 and link them to Mini Css Extract plugin, any missing functionality or PRs I'm sure would be welcome for discussion there.

@garygreen garygreen changed the title Where are the developers? The future of this plugin vs Mini Css Extract Mar 16, 2018
@vladshcherbin
Copy link

@garygreen proposed solution sounds very reasonable, switched to mini-css-extract-plugin and webpack 4 in a few minutes.

@michael-ciniawsky
Copy link
Member

TL;DR Use mini-css-extract-plugin instead :)

The webpack >= v4.0.0 'support' for extract-text-webpack-plugin was moved to mini-css-extract-plugin as more lightweight approach for webpack >= v4.0.0 and ETWP entered maintenance mode. We are sorry for the inconvenience here, but ETWP reached a point where maintaining it become too much of a burden and it's not the first time upgrading a major webpack version was complicated and cumbersome due to issues with ETWP. The mid-term plan is integrate CSS support directly into webpack to avoid this kind of issue in the future

@michael-ciniawsky
Copy link
Member

I leave this issue open for visibility until I have the chance to npm deprecate and reflect this in the README properly. So please don't close yet :)

@michael-ciniawsky michael-ciniawsky changed the title The future of this plugin vs Mini Css Extract The Future of this Plugin vs. Mini CSS Extract Plugin (=> Use Mini CSS Extract Plugin) Mar 20, 2018
@dfleury
Copy link

dfleury commented Mar 21, 2018

For the most of cases use mini css extract plugin maybe a choice but, I've a heavy use case of webpack and I've been using ETWP to extract not just css but tiny js files too.

Well, I pretty disappointed. Can't you just put ETWP to work with webpack 4 and break compatibility webpack 3? This way you can put ETWP 3.x to match with webpack 3 only and set it to maintenance mode. I saw this is exactly the same thing you guys did on webpack 1, 2 and 3.

Maybe the biggest arch issue which need to be solved is to accept the webpack's breaking change nature and transform ETWP in a set of tools not coupled webpack specific arch version but one which can be applied to any of it.

How about it?

ps.: Please, don't get me wrong, I'm not meaning that the problem you guys are trying to solve is a simple/easy thing.

@andriijas
Copy link

@dfleury just stick with webpack 3 until you feel comfortable of letting go of ETWP.

Basically ETWP has always managed to get around by using hacks, upgrading it properly to work with the new APIs in webpack 4 basically means rewriting it as MiniCSSExtractPlugin.

Everyone have limited time and effort, its better to redirect the energy on building stable future proof solutions rather than putting a lot of time and effort maintaining the past.

@alexander-akait
Copy link
Member

@dfleury main problem in extract - difference type of assets (html, css, txt, markdown and many etc) have difference logic on loading page, example for css is very important save order loading, for html is very important inject in right place, for some case also importing order loading, also each extraction require some additional options for control this. And it is all do ETWP is very bigger and not universal with very buggy behavior. We should have for each type of asset own implementation extraction, future ETWP is just extract assets from bundle and all, without any features (it will be in near future as major release). If you have some assets which should be extract and you have problem with this please write about here, we will search solution. Thanks!

Gazler added a commit to Gazler/phoenix that referenced this issue Apr 5, 2018
According to the TL;DR of the comment below, mini-css-extract-plugin is
replacing extract-text-webpack-plugin which will be deprecated. Since
this does not have a built in optimizer for CSS, a separate plugin is
used. However overriding the optimizer means that UglifyJS must be
included manually (previously this was a transitive dependency of
webpack which was used automatically in production mode)

webpack-contrib/extract-text-webpack-plugin#749 (comment)

This closes phoenixframework#2818
Gazler added a commit to Gazler/phoenix that referenced this issue Apr 5, 2018
According to the TL;DR of the comment below, mini-css-extract-plugin is
replacing extract-text-webpack-plugin which will be deprecated. Since
this does not have a built in optimizer for CSS, a separate plugin is
used. However overriding the optimizer means that UglifyJS must be
included manually (previously this was a transitive dependency of
webpack which was used automatically in production mode)

webpack-contrib/extract-text-webpack-plugin#749 (comment)

This closes phoenixframework#2818
chrismccord pushed a commit to phoenixframework/phoenix that referenced this issue Apr 9, 2018
According to the TL;DR of the comment below, mini-css-extract-plugin is
replacing extract-text-webpack-plugin which will be deprecated. Since
this does not have a built in optimizer for CSS, a separate plugin is
used. However overriding the optimizer means that UglifyJS must be
included manually (previously this was a transitive dependency of
webpack which was used automatically in production mode)

webpack-contrib/extract-text-webpack-plugin#749 (comment)

This closes #2818
@alexander-akait
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants