-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.ts
44 lines (42 loc) · 1.18 KB
/
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
38
39
40
41
42
43
44
import * as path from 'path';
import * as webpack from 'webpack';
const config: webpack.Configuration = {
entry: {
'app.js': './src/index.tsx',
},
output: {
path: path.resolve(__dirname, 'public/'),
filename: '[name]',
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
// '/SRC': path.resolve(__dirname, 'src/'),
},
},
module: {
rules: [
{
test: /\.scss$/,
use: [
'style-loader', // creates style nodes from JS strings
'css-loader', // translates CSS into CommonJS
// { loader: path.resolve(__dirname, './scripts/minifycss.js') },
'sass-loader', // compiles Sass to CSS, using Node Sass by default,
],
},
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: [/node_modules/, /\.test\./i],
},
],
},
optimization: {
minimize: true,
moduleIds: 'deterministic',
innerGraph: true,
concatenateModules: true
},
};
export default config;