Skip to content

Commit ff4533b

Browse files
fix: added fix for ESM module cannot use module.exports issue
1 parent 1aba6bd commit ff4533b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

webpack/webpack.node.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,16 @@ module.exports = function(options) {
3131
rules: [{
3232
test: /\.js?$/,
3333
exclude: '/node_modules/',
34-
use: [{
34+
use: [
35+
{
36+
loader: 'babel-loader',
37+
options: {
38+
presets: [['@babel/preset-env', {
39+
modules: "commonjs"
40+
}]],
41+
}
42+
},
43+
{
3544
loader: 'string-replace-loader',
3645
options: {
3746
search: '{{PLATFORM}}',

0 commit comments

Comments
 (0)