vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.58k stars 4.76k forks source link

Consider replacing stylus-loader with stylus-native-loader? #2446

Open slightlyfaulty opened 4 years ago

slightlyfaulty commented 4 years ago

Feature request

What problem does this feature solve?

Stylus-loader is unmaintained with many critical issues left dormant. In Node 14, Stylus itself also causes several warnings to be emitted (see stylus/stylus#2538). These warnings show every time vuepress builds.

Stylus-native-loader has many advantages over stylus-loader, including suppressing these unnecessary warnings, at least until stylus/stylus#2538 gets merged and released.

What does the proposed API look like?

Stylus-native-loader is a drop-in replacement for stylus-loader in the majority of cases. Probably the biggest user-facing difference is that Webpack aliases are resolved without needing a leading tilde (~).

How should this be implemented in your opinion?

Replace all instances of stylus-loader with stylus-native-loader in code and docs.

Are you willing to work on this yourself?

I've already tested this on my local machine and it works great. Build time is even about 0.5-1s faster.

I'm more than happy to submit a PR.

slightlyfaulty commented 4 years ago

Update: The warnings emitted by Stylus in Node 14 have been patched.