forked from AnotherKamila/songbook-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
45 lines (42 loc) · 1.34 KB
/
webpack.config.js
File metadata and controls
45 lines (42 loc) · 1.34 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
44
45
require('es6-promise').polyfill();
path = require('path')
var LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
var webpack = require('webpack');
var build_config = require('./build_config.js')
module.exports = {
devtool: "source-map",
entry: './main.jsx',
output: {
filename: "bundle.js",
path: path.resolve(__dirname, 'public')
},
resolve: {
extensions: ["", ".jsx", ".js", ".css"],
modulesDirectories: ["node_modules"]
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: [ 'react-hot', 'babel' ]
},
{test: /\.sass$/, loaders: ["style", "css?sourceMap", "sass?indentedSyntax,sourceMap"]},
{test: /\.(gif|png|jpg)$/, loader: 'url?limit=50000&name=resources/images/[name].[ext]&mimeType=image/[ext]'},
{test: /\.svg$/, loader: 'svg-url-loader'},
{test: /\.ya?ml$/, loaders: ['json', 'yaml']},
]
},
plugins: [
new LodashModuleReplacementPlugin,
new webpack.optimize.OccurrenceOrderPlugin,
// new webpack.optimize.UglifyJsPlugin,
new webpack.DefinePlugin(build_config),
],
devServer: {
hot: true,
inline: true,
contentBase: 'public/',
port: 8000,
}
}