28 lines
570 B
JavaScript
28 lines
570 B
JavaScript
|
|
const path = require('path');
|
||
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||
|
|
|
||
|
|
module.exports = {
|
||
|
|
entry: './src/renderer/index.tsx',
|
||
|
|
target: 'electron-renderer',
|
||
|
|
module: {
|
||
|
|
rules: [
|
||
|
|
{
|
||
|
|
test: /\.tsx?$/,
|
||
|
|
use: 'ts-loader',
|
||
|
|
exclude: /node_modules/,
|
||
|
|
},
|
||
|
|
],
|
||
|
|
},
|
||
|
|
resolve: {
|
||
|
|
extensions: ['.tsx', '.ts', '.js'],
|
||
|
|
},
|
||
|
|
output: {
|
||
|
|
filename: 'renderer.js',
|
||
|
|
path: path.resolve(__dirname, 'dist/renderer'),
|
||
|
|
},
|
||
|
|
plugins: [
|
||
|
|
new HtmlWebpackPlugin({
|
||
|
|
template: './src/renderer/index.html'
|
||
|
|
}),
|
||
|
|
],
|
||
|
|
};
|