mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[bugfix] exclude regedit-rs on externals when webpack bundles it in linux
This commit is contained in:
@@ -6,8 +6,20 @@ import webpack from "webpack";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import { dependencies as externals } from "../../release/app/package.json";
|
||||
|
||||
function createExternals(): string[] {
|
||||
const webpackExternals: string[] = [...Object.keys(externals || {})];
|
||||
const excludedExternals: string[] = [];
|
||||
|
||||
if (process.platform === "linux") {
|
||||
// Linux only uses regedit-rs types
|
||||
excludedExternals.push("regedit-rs");
|
||||
}
|
||||
|
||||
return webpackExternals.filter(external => !excludedExternals.includes(external));
|
||||
}
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
externals: [...Object.keys(externals || {})],
|
||||
externals: createExternals(),
|
||||
|
||||
stats: "errors-only",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user