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.
This commit is contained in:
Norbert Renner 2022-06-24 16:30:25 +02:00
parent cc7f4250ed
commit 9852aaf4e1

View file

@ -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'))