-
Notifications
You must be signed in to change notification settings - Fork 5
Update Electron to latest: update webpack to vite #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
de759ab
cb01e86
9f83683
5859830
ebaccad
bef10ef
e51b043
5abf2f4
92e3621
815287a
6916cc2
bfb3258
5a8aad1
ee22804
903f0d0
7b75bd8
d0db796
8aa0cff
1b6ac03
c2fea5e
a6ea6be
31b1886
e05cc90
bd6cf53
65bf35d
7a55672
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 11.14.0 | ||
| 18.19.0 |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,30 @@ | ||
| const path = require('path'); | ||
| const ThreadsPlugin = require('threads-plugin'); | ||
| const path = require("path"); | ||
| const ThreadsPlugin = require("threads-plugin"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). |
||
|
|
||
| module.exports = function (config) { | ||
| config.resolve.modules = [path.resolve(__dirname, './src'), 'node_modules']; | ||
| config.resolve.modules = [path.resolve(__dirname, "./src"), "node_modules"]; | ||
|
|
||
| config.optimization = { | ||
| ...config.optimization, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected '}' to match '{' from line 7 and instead saw '...'. |
||
| moduleIds: "named", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected '}' to match '{' from line 4 and instead saw ':'. |
||
| }; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected '}'. |
||
|
|
||
| config.module.rules = config.module.rules.filter(r => { | ||
| return (r.use !== 'node-loader'); | ||
| config.module.rules = config.module.rules.filter((r) => { | ||
| return r.use !== "node-loader"; | ||
| }); | ||
|
|
||
| config.module.rules.unshift({ | ||
| test: /\.node$/, | ||
| use: { | ||
| loader: 'native-ext-loader', | ||
| loader: "native-ext-loader", | ||
| options: { | ||
| rewritePath: undefined, | ||
| name: '[path][name].[ext]', | ||
| name: "[path][name].[ext]", | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| config.plugins.unshift( | ||
| new ThreadsPlugin({ target: 'electron-node-worker' }) | ||
| ); | ||
| config.plugins.unshift(new ThreadsPlugin({ target: "electron-node-worker" })); | ||
|
|
||
| return config; | ||
| } | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,27 @@ | ||
| const path = require('path'); | ||
| const path = require("path"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). |
||
|
|
||
| module.exports = { | ||
| resolve: { | ||
| modules: [path.resolve(__dirname, './src'), 'node_modules'] | ||
| }, | ||
| externals: [ | ||
| 'react', | ||
| 'react-dom', | ||
| ], | ||
| module.exports = function (config) { | ||
| // Create a fresh config object | ||
| const newConfig = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz). |
||
| ...config, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected '}' to match '{' from line 5 and instead saw '...'. |
||
| resolve: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected '}' to match '{' from line 3 and instead saw ':'. |
||
| modules: [path.resolve(__dirname, "./src"), "node_modules"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Label 'modules' on [ statement. |
||
| extensions: [".ts", ".tsx", ".js", ".jsx"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected '}' to match '{' from line 7 and instead saw ':'. |
||
| alias: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected an assignment or function call and instead saw an expression. |
||
| "@app": path.resolve(__dirname, "./src/app"), | ||
| "@renderer": path.resolve(__dirname, "./src/renderer"), | ||
| }, | ||
| }, | ||
| externals: ["react", "react-dom"], | ||
| optimization: { | ||
| moduleIds: "named", | ||
| chunkIds: "named", | ||
| }, | ||
| }; | ||
|
|
||
| // Remove any Webpack 4 specific configurations | ||
| delete newConfig.optimization.namedModules; | ||
| delete newConfig.optimization.namedChunks; | ||
|
|
||
| return newConfig; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).