This repository was archived by the owner on Sep 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
43 lines (42 loc) · 1.43 KB
/
Copy pathwebpack.config.js
File metadata and controls
43 lines (42 loc) · 1.43 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
var WebpackBundleSizeAnalyzerPlugin = require('webpack-bundle-size-analyzer').WebpackBundleSizeAnalyzerPlugin;
var path = require("path");
module.exports = {
entry: path.resolve("./src/entry_point.tsx"),
devtool: "source-map",
module: {
loaders: [
{ test: /\.tsx?$/, exclude: /node_modules/, loader: "awesome-typescript-loader" },
{
test: /\.css$/,
exclude: /node_modules/,
loader: "style-loader!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]&camelCase=dashes"
}
]
},
resolve: {
alias: {
// allows us to behave as if we live
// in react land; even though we are
// really using Preact behind the
// scenes. The alias extends to
// dependencies (e.g. react-motion)
// as well.
"react": "preact-compat",
"react-dom": "preact-compat"
},
modules: [
path.resolve("."),
"node_modules"
],
extensions: [".ts", ".tsx", ".css", ".js", ".jsx", ".json"]
},
plugins: [
new WebpackBundleSizeAnalyzerPlugin('./reports/plain-report.txt')
],
output: {
filename: "bundle.js",
chunkFilename: "[id].bundle.js",
path: path.resolve("./public/javascripts"),
publicPath: "http://localhost:3000/javascripts/"
}
};