Merge pull request #17626 from vector-im/jryans/webpack-lint

Fix lint errors in Webpack config
This commit is contained in:
J. Ryan Stinnett 2021-06-11 16:30:39 +01:00 committed by GitHub
commit 378919cbfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,10 @@
/* eslint-disable quote-props */
const path = require('path'); const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const webpack = require("webpack");
const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload'); const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL; let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
@ -143,11 +144,11 @@ module.exports = (env, argv) => {
// overflows (https://github.com/webpack/webpack/issues/1721), and // overflows (https://github.com/webpack/webpack/issues/1721), and
// there is no need for webpack to parse them - they can just be // there is no need for webpack to parse them - they can just be
// included as-is. // included as-is.
/highlight\.js[\\\/]lib[\\\/]languages/, /highlight\.js[\\/]lib[\\/]languages/,
// olm takes ages for webpack to process, and it's already heavily // olm takes ages for webpack to process, and it's already heavily
// optimised, so there is little to gain by us uglifying it. // optimised, so there is little to gain by us uglifying it.
/olm[\\\/](javascript[\\\/])?olm\.js$/, /olm[\\/](javascript[\\/])?olm\.js$/,
], ],
rules: [ rules: [
{ {