Created
January 13, 2016 22:33
-
-
Save vidaaudrey/eb6f5c6be65a7daae658 to your computer and use it in GitHub Desktop.
webpack basic babel setup
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
module.exports = { | |
entry: './src/js/entry.js', | |
output: { | |
filename: 'dist/bundle.js' | |
}, | |
module: { | |
preLoaders: [{ | |
test: /\.jsx?$/, | |
exclude: /(node_modules|bower_components)/, | |
loader: 'source-map' | |
}], | |
loaders: [{ | |
test: /\.scss$/, | |
include: /src/, | |
loaders: [ | |
'style', | |
'css', | |
'autoprefixer?browsers=last 3 versions', | |
'sass?outputStyle=expanded' | |
] | |
}, { | |
test: /\.(jpe?g|png|gif|svg)$/i, | |
loaders: [ | |
'url?limit=8192', | |
'img' | |
] | |
}, { | |
test: /\.jsx?$/, | |
exclude: /(node_modules|bower_components)/, | |
loaders: [ | |
'react-hot', | |
'babel?stage=0' | |
] | |
}] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment