Skip to content

Instantly share code, notes, and snippets.

@d0peCode
Created June 13, 2019 13:30
Show Gist options
  • Save d0peCode/93e23040c4c89f1216bd08f76ccfe9a1 to your computer and use it in GitHub Desktop.
Save d0peCode/93e23040c4c89f1216bd08f76ccfe9a1 to your computer and use it in GitHub Desktop.
...
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/renderer/html/index.html",
"js": "./src/renderer/js/index.js",
"name": "main_window"
}
]
}
}
]
]
...
module.exports = {
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: './src/main.js',
// Put your normal webpack config below here
module: {
rules: require('./webpack.rules'),
},
};
module.exports = {
// Put your normal webpack config below here
module: {
rules: require('./webpack.rules'),
},
};
module.exports = [
// Add support for native node modules
{
test: /\.node$/,
use: 'node-loader',
},
{
test: /\.(m?js|node)$/,
parser: { amd: false },
use: {
loader: '@marshallofsound/webpack-asset-relocator-loader',
options: {
outputAssetBase: 'native_modules',
},
},
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment