-
Notifications
You must be signed in to change notification settings - Fork 97
/
webpack.config.ts
37 lines (34 loc) · 909 Bytes
/
webpack.config.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
import * as path from 'path';
import * as webpack from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import StatoscopePlugin from '@statoscope/webpack-plugin';
import ModuleLogger from './plugins/moduleLogger';
const config: webpack.Configuration = {
mode: 'production',
entry: {
root: './src/pages/root.tsx',
root2: './src/pages/root2.tsx',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].[contenthash].js',
},
plugins: [
new HtmlWebpackPlugin(),
new ModuleLogger(),
new StatoscopePlugin({
saveStatsTo: 'stats.json',
saveOnlyStats: false,
open: false,
}),
],
resolve: {
fallback: {
"buffer": require.resolve("buffer"),
"stream": false,
},
},
module: {
},
};
export default config;