mirror of
https://github.com/yang991178/fluent-reader.git
synced 2024-12-11 08:27:48 +01:00
48 lines
967 B
JavaScript
48 lines
967 B
JavaScript
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
module.exports = [
|
|
{
|
|
mode: 'production',
|
|
entry: './src/electron.ts',
|
|
target: 'electron-main',
|
|
module: {
|
|
rules: [{
|
|
test: /\.ts$/,
|
|
include: /src/,
|
|
resolve: {
|
|
extensions: ['.ts', '.js']
|
|
},
|
|
use: [{ loader: 'ts-loader' }]
|
|
}]
|
|
},
|
|
output: {
|
|
path: __dirname + '/dist',
|
|
filename: 'electron.js'
|
|
}
|
|
},
|
|
{
|
|
mode: 'production',
|
|
entry: './src/index.tsx',
|
|
target: 'electron-renderer',
|
|
devtool: 'source-map',
|
|
module: {
|
|
rules: [{
|
|
test: /\.ts(x?)$/,
|
|
include: /src/,
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js']
|
|
},
|
|
use: [{ loader: 'ts-loader' }]
|
|
}]
|
|
},
|
|
output: {
|
|
path: __dirname + '/dist',
|
|
filename: 'index.js'
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: './src/index.html'
|
|
})
|
|
]
|
|
}
|
|
]; |