-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
webpack.config.website.ts
60 lines (56 loc) · 1.39 KB
/
webpack.config.website.ts
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import webpack from 'webpack';
import merge from 'webpack-merge';
import path from 'path';
import {baseConfig, hotReloadPlugins} from './webpack.config.base';
const websiteConfig: webpack.Configuration = merge(baseConfig, {
entry: {
app: './src/website/app.tsx',
},
output: {
path: path.resolve(__dirname, 'dist/website'),
publicPath: '/',
},
devServer: {
contentBase: path.join(__dirname, 'dist/website'),
historyApiFallback: true,
port: 2004,
hot: true,
},
optimization: {
runtimeChunk: {name: 'runtime-website'},
},
module: {
rules: [
{
test: /\.(gif|png|jpe?g|svg|mp4|webm)$/,
use: [
'file-loader',
{
loader: 'image-webpack-loader',
options: {
disable: true,
},
},
],
},
{
test: /\.ttf$/,
use: [{loader: 'file-loader'}],
},
{
test: /electron/,
use: 'null-loader',
},
],
},
plugins: [
...hotReloadPlugins,
new HtmlWebpackPlugin({title: 'prolink tools', favicon: 'build/icon.png'}),
new ForkTsCheckerWebpackPlugin({
issue: {include: [{file: 'src/website/**/*'}, {file: 'src/shared/**/*'}]},
}),
],
});
export default websiteConfig;