forked from luchkonikita/music_player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
57 lines (54 loc) · 1.3 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
52
53
54
55
56
57
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const path = require('path')
const plugins = [
new ExtractTextPlugin('public/stylesheets/application.css')
]
if (process.env.NODE_ENV === 'production') {
plugins.push(new webpack.optimize.UglifyJsPlugin())
}
module.exports = {
entry: {
application: './javascripts/renderer/application.js'
},
output: {
path: __dirname,
filename: 'public/javascripts/application.js',
publicPath: 'http://localhost:8080/'
},
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
images: (path.resolve(__dirname) + '/images')
}
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules)/,
loader: 'babel'
},
{
test: /\.sass$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader!autoprefixer-loader!sass-loader?indentedSyntax=true')
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{
test: /\.(ttf)$/,
loader: 'url-loader?limit=100000&name=./public/fonts/[hash].[ext]'
},
{
test: /\.svg$/,
loader: 'raw'
}
],
noParse: [
/node_modules\/sinon/,
]
},
plugins: plugins
}