Skip to content

Commit 5c30e8a

Browse files
Dale KunceDale Kunce
authored andcommitted
Fix ESM import error in gulpfile for del package
- del package is now ESM-only and requires dynamic imports in CommonJS files
1 parent fcf0934 commit 5c30e8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gulpfile.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const gulp = require('gulp');
22

33
const autoprefixer = require('gulp-autoprefixer');
44
const browserSync = require('browser-sync');
5-
const { deleteAsync } = require('del');
65
const concat = require('gulp-concat');
76
const cp = require('child_process');
87
const fs = require('fs');
@@ -36,7 +35,8 @@ async function grabEvents () {
3635
}
3736
}
3837

39-
function clean () {
38+
async function clean () {
39+
const { deleteAsync } = await import('del');
4040
return deleteAsync(['_site', '.tmp', 'app/_data/events', 'app/_posts']);
4141
}
4242
exports.clean = clean;

0 commit comments

Comments
 (0)