Skip to content

Commit

Permalink
cleanup: lint fix for webpack.config.js, remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Dec 20, 2022
1 parent 28529b8 commit 1d29fa8
Showing 1 changed file with 8 additions and 34 deletions.
42 changes: 8 additions & 34 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ const moduleSettings = {
]
};

/*
const fallback = {
"stream": require.resolve("stream-browserify"),
"querystring": require.resolve("querystring-es3"),
"url": require.resolve("url/")
};
*/

const optimization = {
minimize: true,
minimizer: [
Expand All @@ -73,16 +65,6 @@ const electronMainConfig = (/*env, argv*/) => {
"electron": "./src/electron/electron-rec-main.js",
},
optimization,
/*
resolve: {
alias: {
"abort-controller": "abort-controller/dist/abort-controller.js",
"dlv": "dlv/dist/dlv.js",
"bignumber.js": "bignumber.js/bignumber.js",
//"multiformats/hashes/sha2": "multiformats/cjs/src/hashes/sha2.js"
}
},
*/
output: {
path: DIST_ELECTRON,
filename: "[name].js"
Expand All @@ -100,12 +82,6 @@ const electronMainConfig = (/*env, argv*/) => {
],
}),
],
/*
externals: {
"bufferutil": "bufferutil",
"utf-8-validate": "utf-8-validate",
},
*/
module: moduleSettings,
};
};
Expand Down Expand Up @@ -169,17 +145,15 @@ function sharedBuild(outputPath, {plugins = [], copy = [], entry = {}, extra = {
},
plugins: [
new webpack.NormalModuleReplacementPlugin(
/^node:*/,
(resource) => {
switch (resource.request) {
case "node:stream":
resource.request = "stream-browserify";
break;
}
},
/^node:*/,
(resource) => {
switch (resource.request) {
case "node:stream":
resource.request = "stream-browserify";
break;
}
},
),


new webpack.ProvidePlugin({
process: "process/browser.js",
Buffer: ["buffer", "Buffer"],
Expand Down

0 comments on commit 1d29fa8

Please sign in to comment.