-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.dev.ts
More file actions
46 lines (43 loc) · 914 Bytes
/
Copy pathwebpack.config.dev.ts
File metadata and controls
46 lines (43 loc) · 914 Bytes
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
import * as webpack from "webpack";
import * as webpackDevServer from "webpack-dev-server";
import * as HtmlWebpackPlugin from "html-webpack-plugin";
import * as CopyWebpackPlugin from "copy-webpack-plugin";
const timestamp = JSON.stringify(new Date().toISOString());
const config = {
entry: "./src/index.ts",
resolve: {
extensions: [".js", ".ts", ".tsx"],
},
module: {
rules: [
{
test: /.tsx?$/,
loader: "ts-loader",
},
],
},
plugins: [
new webpack.DefinePlugin({
BUILD_TIMESTAMP: timestamp,
IS_PRODUCTION: false,
}),
new HtmlWebpackPlugin({
title: "beatronome.one",
favicon: "assets/icons/logo16.png",
}),
new CopyWebpackPlugin({
patterns: [
{
from: "assets/**/*",
to: "./",
},
],
}),
],
devtool: "source-map",
devServer: {
port: 3000,
stats: "errors-warnings",
} as webpackDevServer.Configuration,
};
module.exports = config;