creativetimofficial / ct-impact-design-system-pro

Impact Design System PRO
https://demos.creative-tim.com/impact-design-system-pro/
3 stars 2 forks source link

require() of ES Module not supported #19

Open Ray-Sutton opened 2 years ago

Ray-Sutton commented 2 years ago

To get the gulp command to work, I had to update const del = require('del'); --> const del = import('del');. Now, when I run the commands to export the html/css/js files I get this error: TypeError: del is not a function. I've been in this look over and over trying to ensure it's correctly defined and hitting a wall. @timcreative

azri-cs commented 1 year ago

Try this:

  1. Replace const del = require('del'); with import { deleteSync } from 'del'
  2. Find and replace any usage of del() to deleteSync() statement for example: return del([paths.dist.base]); to return deleteSync([paths.dist.base]);