-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
54 lines (53 loc) · 1.39 KB
/
webpack.config.js
File metadata and controls
54 lines (53 loc) · 1.39 KB
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
const path = require ('path');
const env = process.env.NODE_ENV;
/** @type import('webpack').Configuration */
module.exports = {
mode: env || 'development',
context: path.resolve (__dirname, './public/'),
entry: {
index: [path.resolve (__dirname, 'src/index.tsx')],
},
output: {
path: path.resolve (__dirname, 'public'),
publicPath: '/',
},
module: {
rules: [
{
test: /\.scss$/,
use: [
{loader: 'style-loader'},
{loader: 'css-modules-typescript-loader'},
{loader: 'css-loader', options: {modules: true}},
{loader: 'sass-loader'},
],
},
{
test: /\.worker\.ts$/,
loader: 'worker-loader',
},
{
test: /\.(ts|tsx)$/,
loader: 'light-ts-loader',
},
{
test: /\.svg$/,
loader: '@svgr/webpack',
},
],
},
resolve: {
extensions: ['.ts', '.tsx', '.jsx', '.js'],
alias: {
src: path.resolve (__dirname, './src'),
appTypes: path.resolve (__dirname, './types/app/'),
modelTypes: path.resolve (__dirname, './types/models/'),
payloadTypes: path.resolve (__dirname, './types/payloads/'),
assets: path.resolve (__dirname, './assets'),
mock: path.resolve (__dirname, './mock'),
usecase: path.resolve (__dirname, './src/usecase/'),
},
},
performance: {hints: false},
node: {fs: 'empty'},
};