-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
52 lines (50 loc) · 1.32 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
41
42
43
44
45
46
47
48
49
50
51
var path = require('path');
var copyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
// context: path.join(__dirname, 'src'),
entry: {
javascript: "./src/scripts/index.js",
html: "./src/index.html"
},
output: {
path: path.join(__dirname, 'build'),
filename: "assets/bundle.js"
},
module: {
loaders: [
{
test: /\.html$/,
loader: "file?name=[name].[ext]"
},
{
test: /\.scss$/,
loader: "style!css!sass"
},
{
test: /\.js(x?)$/,
exclude: /node_modules/,
loaders: ["react-hot", "babel"]
},
{
test: /\.(mp3|wave)$/,
loader:'file'
}
]
},
resolve: {
extensions: ['', '.js', 'jsx', '.sass', '.scss', '.css']
},
devServer: {
contentBase: path.join(__dirname, 'build'),
//noInfo: true, // suppress webpack output into console
hot: true,
inline: true,
historyApiFallback: true
},
plugins: [
new copyWebpackPlugin([
{ from: './src/static', to: 'static' },
{ from: './src/vendor', to: 'assets/vendor' }
])
]
};