const path = require('path')
const webpack = require('webpack')
module.exports = {
mode: 'development',
entry: {
app: ['babel-regenerator-runtime', './index.js'],
},
output: {
path: path.resolve(__dirname, 'electron', 'dist'),
filename: 'bundle.js',
},
node: {
__filename: true,
__dirname: true,
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
},
{
test: /\.(png|ttf)$/,
loader: 'file-loader',
options: {
publicPath: 'dist/',
},
},
],
},
resolve: {
alias: {
'react-native': 'react-native-electron',
},
extensions: ['.web.js', '.js', '.json'],
},
plugins: [
new webpack.DefinePlugin({
__DEV__: JSON.stringify(true),
}),
],
target: 'electron-renderer',
}