Add scss example

Closes #26
This commit is contained in:
Lars Karlitski 2018-06-22 11:15:57 +02:00 committed by Martin Pitt
parent 47e02ef136
commit 7260f5c01f
6 changed files with 23 additions and 7 deletions

View file

@ -1,5 +1,6 @@
const path = require("path");
const copy = require("copy-webpack-plugin");
const extract = require("extract-text-webpack-plugin");
const fs = require("fs");
const webpack = require("webpack");
const CompressionPlugin = require("compression-webpack-plugin");
@ -82,7 +83,8 @@ var plugins = [
'NODE_ENV': JSON.stringify(production ? 'production' : 'development')
}
}),
new copy(info.files)
new copy(info.files),
new extract("[name].css")
];
/* Only minimize when in production mode */
@ -149,6 +151,11 @@ module.exports = {
exclude: /node_modules/,
loader: 'babel-loader',
test: /\.es6$/
},
{
exclude: /node_modules/,
loader: extract.extract('css-loader!sass-loader'),
test: /\.scss$/
}
]
},