summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-10-19 14:42:02 +0200
committerGitHub2018-10-19 14:42:02 +0200
commit26a65322a44aa2cc358ee9482f997915e8985cc0 (patch)
tree18513b8ca1329331cc4dafb7e97c4a1f328a8dba
parentc97027b897378d79be8d937f7a0c2605b7cdb017 (diff)
parent098908fb25840fcdaf448388df698817dc0c93cd (diff)
Merge pull request #1021 from davidmehren/webpack-4
Webpack: Cleanup common config
-rw-r--r--webpack.common.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/webpack.common.js b/webpack.common.js
index efd2b3e2..1fbf247d 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -1,12 +1,12 @@
-var webpack = require('webpack')
-var path = require('path')
-var HtmlWebpackPlugin = require('html-webpack-plugin')
-var CopyWebpackPlugin = require('copy-webpack-plugin')
+const webpack = require('webpack')
+const path = require('path')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
// Fix possible nofile-issues
-var fs = require('fs')
-var gracefulFs = require('graceful-fs')
+const fs = require('fs')
+const gracefulFs = require('graceful-fs')
gracefulFs.gracefulify(fs)
module.exports = {
@@ -392,7 +392,7 @@ module.exports = {
module: {
rules: [{
test: /\.js$/,
- use: [{loader: 'babel-loader'}],
+ use: [{ loader: 'babel-loader' }],
exclude: [/node_modules/, /public\/vendor/]
}, {
test: /\.css$/,
@@ -428,43 +428,43 @@ module.exports = {
test: require.resolve('js-sequence-diagrams'),
use: [{
loader: 'imports-loader',
- options: {_: 'lodash', Raphael: 'raphael', eve: 'eve'}
+ options: { _: 'lodash', Raphael: 'raphael', eve: 'eve' }
}]
}, {
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
- use: [{loader: 'file-loader'}]
+ use: [{ loader: 'file-loader' }]
}, {
test: /\.html$/,
- use: [{loader: 'string-loader'}]
+ use: [{ loader: 'string-loader' }]
}, {
test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {prefix: 'font/', limit: '5000'}
+ options: { prefix: 'font/', limit: '5000' }
}]
}, {
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '5000', mimetype: 'application/octet-stream'}
+ options: { limit: '5000', mimetype: 'application/octet-stream' }
}]
}, {
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '10000', mimetype: 'svg+xml'}
+ options: { limit: '10000', mimetype: 'svg+xml' }
}]
}, {
test: /\.png(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '10000', mimetype: 'image/png'}
+ options: { limit: '10000', mimetype: 'image/png' }
}]
}, {
test: /\.gif(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '10000', mimetype: 'image/gif'}
+ options: { limit: '10000', mimetype: 'image/gif' }
}]
}]
},