Last active
June 25, 2016 23:41
-
-
Save mattmcla/c8e42f134b022b833f95377542c7a47c to your computer and use it in GitHub Desktop.
This file contains 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
const path = require('path') | |
module.exports = { | |
context: path.join(__dirname, 'src'), | |
entry: './script/main.jsx', | |
resolve: { | |
extensions: ['', '.js', '.jsx', '.scss'], | |
alias: { | |
config: path.join(__dirname, 'src/config/dev.js'), | |
}, | |
}, | |
output: { | |
path: path.join(__dirname, 'dist'), | |
filename: 'bundle.js', | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.jsx?$/, | |
loader: 'babel', | |
// .babelrc in use | |
}, | |
{ | |
test: /\.scss$/, | |
loaders: [ | |
'style?sourceMap', | |
'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]', | |
'postcss', | |
'sass?sourceMap&sourceMapContents', | |
], | |
}, | |
], | |
}, | |
sassLoader: { | |
includePaths: [path.resolve(__dirname, './node_modules')], | |
}, | |
postcss: function postcss() { | |
return [ | |
require('autoprefixer')({ browsers: ['last 2 versions'] }), | |
] | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment