-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.ts
45 lines (44 loc) · 1.13 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
45
import * as path from 'path';
import HtmlWebpackPlugin from 'html-webpack-plugin'
import { Configuration } from 'webpack';
import 'webpack-dev-server';
const config: Configuration = {
entry: "./client/entry-client.tsx",
target: "web",
mode: "development",
output: {
path: path.resolve(__dirname, "build"),
filename: "vendor.js",
},
resolve: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
alias: {
"@atom": path.resolve(__dirname, 'atom/'),
"@client": path.resolve(__dirname, 'client/'),
},
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
enforce: "pre",
test: /\.js$/,
loader: "source-map-loader",
},
{
test: /\.css$/,
loader: "css-loader",
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "index.html"),
}),
],
}
export default config