Skip to content

Instantly share code, notes, and snippets.

@UberMouse
Created September 30, 2015 03:11
Show Gist options
  • Save UberMouse/493062d5b633143ec391 to your computer and use it in GitHub Desktop.
Save UberMouse/493062d5b633143ec391 to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
var foundationRoot = path.join(__dirname, 'bower_components', 'foundation', 'scss')
module.exports = {
devtool: 'source-map',
entry: [
'webpack-hot-middleware/client',
'./src/index'
],
resolve: {
root: path.join(__dirname, 'src')
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel'],
include: path.join(__dirname, 'src')
},
{
test: /\.scss$/,
loader: "style-loader!css!sass-loader?outputStyle=expanded&includePaths[]=" + foundationRoot,
include: [
foundationRoot,
path.join(__dirname, 'src', 'scss'),
path.join(__dirname, 'src', 'pages'),
path.join(__dirname, 'src', 'components')
]
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment