A
A
alexovn2021-05-18 07:59:07
css
alexovn, 2021-05-18 07:59:07

How to extract css from js into one shared vendor.min.css file on webpack?

I have third-party libraries connected in my project through node_modules. Swiper Slider, Sweetalert2, etc.

Including styles in a js file (ex. Swiper Slider):
import 'swiper/swiper-bundle.css';

At the output, in the dist folder, you need to get a compressed vendor.min.css, which includes all the styles of third-party libraries

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question