Created
November 19, 2015 21:57
-
-
Save anonymous/f00a73ac9953af1bacfd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
devtool: '#inline-source-map', | |
entry: [ | |
'webpack-hot-middleware/client', | |
'./src/index' | |
], | |
output: { | |
path: path.resolve('./dist'), | |
filename: 'bundle.js', | |
publicPath: '/static/' | |
}, | |
plugins: [ | |
new webpack.optimize.OccurenceOrderPlugin(), | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin(), | |
new webpack.DefinePlugin({ | |
'process.env': { | |
'__DEBUG__': JSON.stringify(true) | |
} | |
}), | |
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/) | |
], | |
resolve: { | |
root: path.resolve('./src'), | |
extensions: ['', '.js'] | |
}, | |
module: { | |
loaders: [{ | |
test: /\.js$/, | |
loaders: ['babel'], | |
include: path.resolve('./src') | |
},{ | |
test: /\.scss$/, | |
loaders: [ | |
'style-loader', | |
'css-loader', | |
'autoprefixer?browsers=last 2 version', | |
'sass-loader' | |
] | |
}] | |
}, | |
sassLoader: { | |
includePaths: path.resolve('./src/styles') | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment