-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (40 loc) · 1.13 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
40
// http://webpack.github.io/docs/configuration.html
// http://webpack.github.io/docs/webpack-dev-server.html
var app_root = 'src'; // the app root folder: src_hello, src_users, etc
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
app_root: app_root, // the app root folder, needed by the other webpack configs
entry: [
__dirname + '/' + app_root + '/index.js',
],
output: {
path: __dirname + '/dist',
filename: 'bundle.js',
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass'],
include: path.join(__dirname, 'src')
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader?limit=8192'
}
],
},
devServer: {
contentBase: __dirname + '/dist',
},
plugins: [new HtmlWebpackPlugin({
title: "",
template: "src/index.html",
})],
};