This repository has been archived on 2021-06-30. You can view files and clone it, but cannot push or open issues or pull requests.
2019-02-09 01:34:04 +00:00
|
|
|
require('dotenv').config();
|
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
|
2019-04-01 17:32:23 +00:00
|
|
|
const absolutePath = path.resolve(__dirname, 'build');
|
2019-02-09 01:34:04 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: process.env.NODE_ENV,
|
|
|
|
|
|
|
|
entry: ['@babel/polyfill', './src/renderer.js'],
|
|
|
|
output: {
|
2019-04-01 17:32:23 +00:00
|
|
|
path: absolutePath,
|
2019-02-09 01:34:04 +00:00
|
|
|
filename: 'bundle.js'
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.jsx?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
presets: ['@babel/preset-env', '@babel/preset-react']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
test: /\.s?css$/,
|
|
|
|
use: [
|
|
|
|
{ loader: 'style-loader' },
|
|
|
|
{ loader: 'css-loader' },
|
|
|
|
{ loader: 'sass-loader' }
|
|
|
|
]
|
|
|
|
}, {
|
|
|
|
test: /\.(png|jpg|svg)$/,
|
|
|
|
use: [{ loader: 'file-loader' }]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
target: 'electron-renderer',
|
|
|
|
devServer: {
|
2019-04-01 17:32:23 +00:00
|
|
|
contentBase: absolutePath,
|
2019-02-09 01:34:04 +00:00
|
|
|
compress: true,
|
|
|
|
port: process.env.PORT
|
|
|
|
}
|
|
|
|
};
|