Skip to content

Instantly share code, notes, and snippets.

@astericky
Last active March 3, 2017 15:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astericky/88d0d28c89eb246799b136e9861998a5 to your computer and use it in GitHub Desktop.
Save astericky/88d0d28c89eb246799b136e9861998a5 to your computer and use it in GitHub Desktop.
Webpack 2 Work Config Example
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