I found this on the Internet gulp-split-files , I hope this answers your problem.
As you told the author in the documentation.
In your gulpfile:
const gulp = require("gulp"); const splitFiles = require("gulp-split-files"); gulp.task("split", function () { return gulp.src("superMegaBigCss.css") .pipe(splitFiles()) .pipe(gulp.dest("path/to/dest")); });
This will create three files:
superMegaBigCss-0.css superMegaBigCss-1.css superMegaBigCss-2.css
I do not think this package is very useful as it breaks the code where we put the comment /*split*/ .
Personally, I like to use webpack so much, now I use it in most of my projects, I think it looks like a butcher, where he chopped off files and linked it in different ways.
source share