From 9852aaf4e1d21c36ef74c924531e224dca43b040 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Fri, 24 Jun 2022 16:30:25 +0200 Subject: [PATCH] Disable babel transpiling of import() call Transpiles to require(), which leads to "ReferenceError: require is not defined". So we rely on browser support for this. --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index be8c3df..5d8cd30 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -134,7 +134,7 @@ gulp.task('scripts', function () { .src(paths.scripts, { base: '.' }) .pipe(sourcemaps.init()) .pipe(cached('scripts')) - .pipe(gulpif(!debug, babel())) + .pipe(gulpif(!debug, babel({ caller: { supportsDynamicImport: true } }))) .pipe(gulpif(!debug, uglify())) .pipe(remember('scripts')) .pipe(concat(paths.destName + '.js'))