-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.ts
34 lines (32 loc) · 1001 Bytes
/
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
import * as webpack from "webpack";
import * as path from "path";
import { optimize} from "webpack";
const config: webpack.Configuration = {
devtool: "cheap-module-eval-source-map",
entry: [
"webpack-hot-middleware/client",
path.join(__dirname, "..", "app.tsx")
],
output: {
filename: "bundle.js",
publicPath: "/",
path: path.join(__dirname, "public"),
},
resolve: {
alias: {},
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js", ".json", ".css"]
},
plugins: [
new optimize.OccurenceOrderPlugin(true),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{test: /\.json?$/, loader: "json"},
{test: /\.tsx?$/, loader: "ts", exclude: /node_modules/},
{test: /\.css$/, loader: "style!css?modules&localIdentName=[name]---[local]---[hash:base64:5]"}
]
}
};
export = config