aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/build.js
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/build.js')
-rw-r--r--tasks/build.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/tasks/build.js b/tasks/build.js
index 9f1efd4f..c9709060 100644
--- a/tasks/build.js
+++ b/tasks/build.js
@@ -30,6 +30,7 @@ const plumber = require('gulp-plumber');
const size = require('gulp-size');
const sourcemaps = require('gulp-sourcemaps');
const browserSync = require('browser-sync').create();
+const gulpIf = require('gulp-if');
// Configs
const build = require('../build.json');
// Info from package
@@ -128,7 +129,7 @@ Object.entries(build.js).forEach(([filename, entry]) => {
},
),
)
- .pipe(header('typeof navigator === "object" && ')) // "Support" SSR (#935)
+ .pipe(gulpIf(() => extension !== 'mjs', header('typeof navigator === "object" && '))) // "Support" SSR (#935)
.pipe(
rename({
extname: `.${extension}`,