-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.babel.js
More file actions
62 lines (61 loc) · 1.57 KB
/
webpack.config.babel.js
File metadata and controls
62 lines (61 loc) · 1.57 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
55
56
57
58
59
60
61
62
import path from 'path';
export default {
entry: {
Accordion: './src/components/Accordion/index.ts',
Button: './src/components/Button/index.ts',
Checkbox: './src/components/Checkbox/index.ts',
Divider: './src/components/Divider/index.ts',
Hint: './src/components/Hint/index.ts',
Modal: './src/components/Modal/index.ts',
Navigation: './src/components/Navigation/index.ts',
Select: './src/components/Select/index.ts',
Spinner: './src/components/Spinner/index.ts',
TextAreaInput: './src/components/TextAreaInput/index.ts',
TextInput: './src/components/TextInput/index.ts',
Toggle: './src/components/Toggle/index.ts',
Typography: './src/components/Typography/index.ts',
index: './src/index.ts',
},
output: {
path: path.resolve('./dist/components'),
filename: '[name].js',
library: {
type: 'umd',
},
globalObject: 'this',
},
externals: [
{
react: 'react',
'react-dom': 'react-dom',
'styled-components': 'styled-components',
'react-modal': 'react-modal',
'react-icons': 'react-icons',
'@tippyjs/react': '@tippyjs/react',
'tippy.js': 'tippy.js',
},
/^@mui\/.+$/,
/^@emotion\/.+$/,
],
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js', '.json'],
fallback: {
fs: false,
net: false,
tls: false,
},
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
],
},
};