-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (42 loc) · 1.01 KB
/
webpack.config.js
File metadata and controls
42 lines (42 loc) · 1.01 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
module.exports = {
mode: 'development',
entry: {
checkout: `${__dirname}/jsx/checkout/main.jsx`,
admin: `${__dirname}/jsx/admin/main.jsx`,
},
output: { filename: '[name].js', path: `${__dirname}/public` },
resolve: {
extensions: [ '.wasm', '.mjs', '.ts', '.tsx', '.js', '.jsx', '.json' ]
},
devtool: 'source-map',
module: {
rules: [{
test: /\.(t|j)s(|x)$/,
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-typescript',
'@babel/preset-flow',
],
plugins: [ '@babel/plugin-proposal-class-properties' ]
}
}
},{
test: /\.css$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" }
]
},{
test: /\.(png|jpg|gif|svg|woff|woff2|eot|ttf)$/i,
use: [{
loader: 'url-loader',
options: { limit: 8192 }
}]
}]
}
}