Skip to content

Instantly share code, notes, and snippets.

@jaburns
Created April 11, 2017 22:35
Show Gist options
  • Save jaburns/6b84cd1b019379ad06df8f2d1d62cc40 to your computer and use it in GitHub Desktop.
Save jaburns/6b84cd1b019379ad06df8f2d1d62cc40 to your computer and use it in GitHub Desktop.
Example of building only sass with webpack for legacy project
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
context: __dirname,
entry: {
styles: ['./sass/main.scss']
},
output: {
filename: 'build.css'
},
module: {
loaders: [{
test: /\.scss$/,
loader: isProduction
? 'css-loader!sass-loader'
: 'css-loader?sourceMap!sass-loader?outputStyle=expanded&sourceMap=true&sourceMapContents=true'
}]
}
};
@aaronamm
Copy link

aaronamm commented May 23, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment