You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gulpfile.js that is auto created (after choosing "convert to Gulp") does not work due to Gulp having been updated to v4.
Steps to recreate
Right-click on project / website
From Bundler & Minifier context-menu, choose "Convert to Gulp"
Current behavior
Minification does not work and errors are reported in the console (relating to gulp v4 changes).
For example, the following line does not work with gulp 4:
gulp.task("min", ["min:js", "min:css", "min:html"]);
Additionally, clean, watch and other methods fail (for the same reasons as above).
instead, it must be rewritten as:
gulp.task("min", gulp.series("min:js", "min:css", "min:html"));
Expected behavior
Minification should work (as expected) without any errors (in the console).
I'm attaching a working version of gulpfile.js, which also includes the following changes/modifications, plus sample bundleconfig.json and versionconfig.json files:
Installed product versions
Description
gulpfile.js that is auto created (after choosing "convert to Gulp") does not work due to Gulp having been updated to v4.
Steps to recreate
Current behavior
Minification does not work and errors are reported in the console (relating to gulp v4 changes).
For example, the following line does not work with gulp 4:
gulp.task("min", ["min:js", "min:css", "min:html"]);
Additionally, clean, watch and other methods fail (for the same reasons as above).
instead, it must be rewritten as:
gulp.task("min", gulp.series("min:js", "min:css", "min:html"));
Expected behavior
Minification should work (as expected) without any errors (in the console).
I'm attaching a working version of gulpfile.js, which also includes the following changes/modifications, plus sample bundleconfig.json and versionconfig.json files:
Added NPM Packages:
"gulp-if"
"gulp-uglify-es" [correctly minifies ES6 syntax]
Removed NPM Package:
"gulp-uglify" [does NOT minify ES6 syntax and throws errors]
Added version configuration file:
versionconfig = require("./versionconfig.json")
version-config adds version-number to the output IF the filename is found within the config-file
Attachmemts:
change_files.zip
The text was updated successfully, but these errors were encountered: