Skip to content

Commit

Permalink
fix: fixed error bundling CJS module
Browse files Browse the repository at this point in the history
Fixes #4242
  • Loading branch information
nolimits4web committed Feb 17, 2021
1 parent 01d81d4 commit 0cda5e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build-js-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cda5e4

Please sign in to comment.