Get rid of dependence on usercontent.riot.im

This commit is contained in:
Michael Telatynski
2020-02-07 22:07:30 +00:00
parent 54f7347da5
commit 98773df76e
6 changed files with 77 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ module.exports = (env, argv) => {
if (argv.mode !== "production") {
// This makes the sourcemaps human readable for developers. We use eval-source-map
// because the plain source-map devtool ruins the alignment.
development['devtool'] = 'eval-source-map';
development['devtool'] = 'source-map';
}
// Resolve the directories for the react-sdk and js-sdk for later use. We resolve these early so we
@@ -34,6 +34,7 @@ module.exports = (env, argv) => {
"bundle": "./src/vector/index.js",
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
"mobileguide": "./src/vector/mobile_guide/index.js",
"usercontent": "./src/vector/usercontent/index.js",
// CSS themes
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
@@ -302,7 +303,7 @@ module.exports = (env, argv) => {
// HtmlWebpackPlugin will screw up our formatting like the names
// of the themes and which chunks we actually care about.
inject: false,
excludeChunks: ['mobileguide'],
excludeChunks: ['mobileguide', 'usercontent'],
minify: argv.mode === 'production',
vars: {
og_image_url: og_image_url,
@@ -316,6 +317,14 @@ module.exports = (env, argv) => {
minify: argv.mode === 'production',
chunks: ['mobileguide'],
}),
// This is the usercontent sandbox's entry point (separate for iframing)
new HtmlWebpackPlugin({
template: './src/vector/usercontent/index.html',
filename: 'usercontent/index.html',
minify: argv.mode === 'production',
chunks: ['usercontent'],
}),
],
output: {
@@ -346,6 +355,7 @@ module.exports = (env, argv) => {
// tedious in Riot since that can take a while.
hot: false,
inline: false,
disableHostCheck: true,
},
};
};