-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathwebpack.config.js
39 lines (36 loc) · 1.01 KB
/
webpack.config.js
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
module.exports = {
context: __dirname + "/app",
entry: {
javascript: "./app.js",
html: "./index.html",
},
output: {
filename: "app.js",
path: __dirname + "/dist",
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ["babel-loader"],
},
{
test: /\.html$/,
loader: "file?name=[name].[ext]",
},
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ["react-hot", "babel-loader"],
},
// Adding a loader for css. To do this with less you download the
// less-loader and add it to the end of the load string here, and
// of course test for less files, not css
{ test: /\.css$/, loader: 'style-loader!css-loader' },
// Any png-image or woff-font below or equal to 100K will be converted
// to inline base64 instead
{ test: /\.woff($|\?)|\.woff2($|\?)|\.ttf($|\?)|\.eot($|\?)|\.svg($|\?)/, loader: 'url-loader?limit=100000' }
],
}
};