Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.