From 0cda5e4708ddb662dfddce3e058cbe57c28696b3 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Wed, 17 Feb 2021 11:28:32 +0300 Subject: [PATCH] fix: fixed error bundling CJS module Fixes #4242 --- scripts/build-js-core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-js-core.js b/scripts/build-js-core.js index b6987c007..8c1146ba4 100644 --- a/scripts/build-js-core.js +++ b/scripts/build-js-core.js @@ -21,7 +21,7 @@ async function buildCore(components, format, cb) { .join('\n'); } else if (format === 'cjs') { coreContent += `"use strict";\n`; - coreContent += `exports._esModule = true;\n`; + coreContent += `exports.__esModule = true;\n`; coreContent += `exports.default = require('./components/core/core-class').default;\n`; coreContent += `exports.Swiper = require('./components/core/core-class').default;\n`; coreContent += components