-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathwebpack.config.js
More file actions
25 lines (24 loc) · 866 Bytes
/
webpack.config.js
File metadata and controls
25 lines (24 loc) · 866 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
var path = require("path");
module.exports = {
entry: {
app: ["./src/index.js"]
},
output: {
path: path.resolve(__dirname, "public"),
//publicPath: "/public/",
filename: "bundle.js"
},
devServer: {
contentBase: path.join(__dirname, "public"), // Tell the server where to serve content from. This is only necessary if you want to serve static files
//publicPath: "/", // The bundled files will be available in the browser under this path.
noInfo: false // Only errors & warns on hot reload
},
module: {
rules: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /.(jpg|png|svg)$/, loader: 'url-loader', options: { limit: 25000, }, }
]
},
};