Last active
March 3, 2017 15:49
-
-
Save astericky/88d0d28c89eb246799b136e9861998a5 to your computer and use it in GitHub Desktop.
Webpack 2 Work Config Example
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: { | |
testname: './index.jsx', | |
}, | |
output: { | |
path: 'path goes here', | |
filename: '[name].js', | |
}, | |
module: { | |
rules: [{ | |
test: /\.jsx?$/, | |
loader: 'babel-loader', | |
}, { | |
test: /\.scss$/, | |
use: [{ | |
loader: 'style-loader', | |
}, { | |
loader: 'css-loader', | |
options: { | |
modules: true, | |
importLoaders: 1, | |
sourceMap: true, | |
localIdentName: '[path]--[name]-[local]--[hash:base64:5]', | |
}, | |
}, { | |
loader: 'sass-loader', | |
}], | |
}], | |
}, | |
resolve: { | |
extensions: ['.js', '.jsx'], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment