mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Add extendedAPI plugin to access globals
This commit is contained in:
parent
c3995eea5e
commit
42e3fd0282
@ -6,6 +6,7 @@ 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 HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
|
const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
|
||||||
|
const { ExtendedAPIPlugin } = require('webpack');
|
||||||
|
|
||||||
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
|
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
|
||||||
if (!ogImageUrl) ogImageUrl = 'https://app.element.io/themes/element/img/logos/opengraph.png';
|
if (!ogImageUrl) ogImageUrl = 'https://app.element.io/themes/element/img/logos/opengraph.png';
|
||||||
@ -219,7 +220,7 @@ module.exports = (env, argv) => {
|
|||||||
|
|
||||||
// It's important that this plugin is last otherwise we end
|
// It's important that this plugin is last otherwise we end
|
||||||
// up with broken CSS.
|
// up with broken CSS.
|
||||||
require('postcss-preset-env')({stage: 3, browsers: 'last 2 versions'}),
|
require('postcss-preset-env')({ stage: 3, browsers: 'last 2 versions' }),
|
||||||
],
|
],
|
||||||
parser: "postcss-scss",
|
parser: "postcss-scss",
|
||||||
"local-plugins": true,
|
"local-plugins": true,
|
||||||
@ -257,7 +258,7 @@ module.exports = (env, argv) => {
|
|||||||
|
|
||||||
// It's important that this plugin is last otherwise we end
|
// It's important that this plugin is last otherwise we end
|
||||||
// up with broken CSS.
|
// up with broken CSS.
|
||||||
require('postcss-preset-env')({stage: 3, browsers: 'last 2 versions'}),
|
require('postcss-preset-env')({ stage: 3, browsers: 'last 2 versions' }),
|
||||||
],
|
],
|
||||||
parser: "postcss-scss",
|
parser: "postcss-scss",
|
||||||
"local-plugins": true,
|
"local-plugins": true,
|
||||||
@ -437,6 +438,8 @@ module.exports = (env, argv) => {
|
|||||||
files: [{ match: /.*Inter.*\.woff2$/ }],
|
files: [{ match: /.*Inter.*\.woff2$/ }],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
new ExtendedAPIPlugin(),
|
||||||
|
|
||||||
...additionalPlugins,
|
...additionalPlugins,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user