nuxt / rfcs

RFCs for changes to Nuxt.js
96 stars 2 forks source link

Discuss if Modern building for assets(CSS..) is necessary #7

Open clarkdo opened 5 years ago

clarkdo commented 5 years ago

Discussion Points:

Atinux commented 5 years ago

What about having modern CSS for the modern build when not having extractCSS?

manniL commented 5 years ago

@Atinux Like that idea! Not much overhead to the current situation and somewhat straightforward implementation I think

clarkdo commented 5 years ago

@Atinux CSS is different from js files, it's only related to postcss, so do you agree that we use current modern browser list to config postcss-preset-env?

And also do you think it's necessary that also build legacy css files with default postcss preset in modern mode ?

Atinux commented 5 years ago

I am talking about the CSS when injected through the JS bundle (when no extractCSS). So yes, when modern mode, we should also set postcss-preset-env to modern browsers.

With extractCSS, I don't know if we can have 2 different CSS file for SPA & Generated.

AndrewBogdanovTSS commented 5 years ago

@Atinux but what complexity does extractCSS adds to the implementation? I use extractCSS (when it's working) a lot and this feature would really feel half implemented if it will cause such limitations

Atinux commented 5 years ago

Well I guess it could support also extractCSS I believe since it's two different build. The main question is: Is it possible to detect the "modern" css files vs "legacy" one?