Merge remote-tracking branch 'origin/develop' into dbkr/wasm

This commit is contained in:
David Baker 2018-10-02 16:58:31 +01:00
commit 30f0a7932b
19 changed files with 12289 additions and 4528 deletions

View file

@ -21,29 +21,40 @@ module.exports = {
"theme-status": "./res/themes/status/css/status.scss",
},
module: {
preLoaders: [
{ test: /\.js$/, loader: "source-map-loader" },
],
loaders: [
{ test: /\.json$/, loader: "json" },
{ test: /\.js$/, loader: "babel", include: path.resolve('./src') },
rules: [
{ enforce: 'pre', test: /\.js$/, use: "source-map-loader", exclude: /node_modules/, },
{ test: /\.js$/, use: "babel-loader", include: path.resolve(__dirname, 'src') },
{
test: /\.scss$/,
// 1. postcss-loader turns the SCSS into normal CSS.
// 2. css-raw-loader turns the CSS into a javascript module
// 2. raw-loader turns the CSS into a javascript module
// whose default export is a string containing the CSS.
// (css-raw-loader is similar to css-loader, but the latter
// (raw-loader is similar to css-loader, but the latter
// would also drag in the imgs and fonts that our CSS refers to
// as webpack inputs.)
// 3. ExtractTextPlugin turns that string into a separate asset.
loader: ExtractTextPlugin.extract("css-raw-loader!postcss-loader?config=postcss.config.js"),
use: ExtractTextPlugin.extract({
use: [
"raw-loader",
{
loader: 'postcss-loader',
options: {
config: {
path: './postcss.config.js'
}
}
}
],
}),
},
{
// this works similarly to the scss case, without postcss.
test: /\.css$/,
loader: ExtractTextPlugin.extract("css-raw-loader"),
use: ExtractTextPlugin.extract({
use: "raw-loader"
}),
},
],
noParse: [
// for cross platform compatibility use [\\\/] as the path separator