Fix npm run build
when using webpack 1.12.15
'remote' module is used in electron-connect but it's removed from electron target on webpack 1.12.15. So define 'remote' as "externals" to avoid bundling error. http://webpack.github.io/docs/configuration.html#externals
This commit is contained in:
@@ -107,7 +107,7 @@ gulp.task('webpack:browser', function() {
|
||||
__filename: false,
|
||||
__dirname: false
|
||||
},
|
||||
target: 'electron'
|
||||
target: 'electron-renderer'
|
||||
}))
|
||||
.pipe(gulp.dest('dist/browser/'));
|
||||
});
|
||||
@@ -128,7 +128,10 @@ gulp.task('webpack:main', function() {
|
||||
__filename: false,
|
||||
__dirname: false
|
||||
},
|
||||
target: 'electron'
|
||||
target: 'electron-main',
|
||||
externals: {
|
||||
remote: true // for electron-connect
|
||||
}
|
||||
}))
|
||||
.pipe(gulp.dest('dist/'));
|
||||
});
|
||||
|
Reference in New Issue
Block a user