-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (32 loc) · 987 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { boilerpack } = require('boilerpack');
const { resolve } = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = boilerpack({ target: 'electron-renderer' })
.addEntry('main', [
resolve(__dirname, 'entries/main.ts'),
'preact',
'core-js/es7/reflect',
])
.addExtensions('.ts', '.tsx')
.addRule('typescript', {
test: /\.tsx?$/,
use: ['awesome-typescript-loader'],
})
.addRule('sass', {
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
})
.addPlugin(new HtmlWebpackPlugin())
// .addPlugin(new CopyWebpackPlugin([
// {
// context: 'node_modules/mdi/fonts',
// from: '*',
// to: 'assets/fonts',
// },
// ]))
.withOutput({
filename: '[name].js',
path: resolve(__dirname, 'dist'),
})
.make();