-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.base.ts
50 lines (49 loc) · 1.16 KB
/
webpack.config.base.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
// Copyright 2021 Zachary Bush.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//
exports.default = {
resolve: {
fallback: { path: require.resolve('path-browserify') },
modules: ['node_modules', 'js'],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.css', '.scss'],
},
module: {
rules: [
{
test: /\.(t|j)sx?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.s(a|c)ss$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: {
namedExport: true,
},
},
},
'sass-loader',
],
},
{
test: /\.(png|svg|jpg|gif)$/,
use: ['file-loader'],
},
],
},
};