Skip to content

Instantly share code, notes, and snippets.

@ketemartinsrufino
Created March 21, 2018 19:11
Show Gist options
  • Save ketemartinsrufino/fa8b8d499db4237ac6eb1749d0274d18 to your computer and use it in GitHub Desktop.
Save ketemartinsrufino/fa8b8d499db4237ac6eb1749d0274d18 to your computer and use it in GitHub Desktop.
const base = {
devtool: 'source-map',
module: {
rules: [
{
test: /\.(js)$/,
include: path.join(__dirname, 'src'),
loader: 'babel-loader',
options: {
cacheDirectory: '.babel-cache',
babelrc: true,
},
},
{
test: /\.scss$/,
include: path.join(__dirname, 'src'),
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
},
},
],
}),
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader'],
},
],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
},
plugins: [
// new HtmlWebpackPlugin(),
new CaseSensitivePathsPlugin(),
new ExtractTextPlugin('style.css'),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment