Move /plugin/name/ to /plugins/name/

The web files for plugins were hosted at /plugin/plugin_name/ while the
view page for a plugin is hosted at /plugins/plugin_name/view.  Reduce
confusion by making both urls use the plural version.
This commit is contained in:
Hornwitser committed 2021-03-13 21:01:53 +01:00
1 parent 71804df3e0
commit 78ce6fc382
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -2049,7 +2049,7 @@ async function startServer(args) {
let pluginPackagePath = require.resolve(path.posix.join(pluginInfo.requirePath, "package.json")); let pluginPackagePath = require.resolve(path.posix.join(pluginInfo.requirePath, "package.json"));
let webPath = path.join(path.dirname(pluginPackagePath), "dist", "web"); let webPath = path.join(path.dirname(pluginPackagePath), "dist", "web");
app.use(`/plugin/${pluginInfo.name}`, express.static(webPath)); app.use(`/plugins/${pluginInfo.name}`, express.static(webPath));
} }
// Load plugins // Load plugins
+1 -1
View File
@@ -42,7 +42,7 @@ async function loadPlugins() {
await __webpack_init_sharing__("default"); await __webpack_init_sharing__("default");
for (let meta of pluginList) { for (let meta of pluginList) {
try { try {
await loadScript(`${basename}/plugin/${meta.name}/remoteEntry.js`); await loadScript(`${basename}/plugins/${meta.name}/remoteEntry.js`);
let container = window[`plugin_${meta.name}`]; let container = window[`plugin_${meta.name}`];
if (!container) { if (!container) {
throw new Error(`Plugin did not expose its container via plugin_${meta.name}`); throw new Error(`Plugin did not expose its container via plugin_${meta.name}`);
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), {
context: __dirname, context: __dirname,
entry: "./web/index.jsx", entry: "./web/index.jsx",
output: { output: {
publicPath: "/plugin/global_chat/", publicPath: "/plugins/global_chat/",
filename: "bundle.js", filename: "bundle.js",
path: path.resolve(__dirname, "dist", "web"), path: path.resolve(__dirname, "dist", "web"),
}, },
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), {
context: __dirname, context: __dirname,
entry: "./web/index.jsx", entry: "./web/index.jsx",
output: { output: {
publicPath: "/plugin/research_sync/", publicPath: "/plugins/research_sync/",
filename: "bundle.js", filename: "bundle.js",
path: path.resolve(__dirname, "dist", "web"), path: path.resolve(__dirname, "dist", "web"),
}, },
@@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), {
context: __dirname, context: __dirname,
entry: "./web/index.jsx", entry: "./web/index.jsx",
output: { output: {
publicPath: "/plugin/statistics_exporter/", publicPath: "/plugins/statistics_exporter/",
filename: "bundle.js", filename: "bundle.js",
path: path.resolve(__dirname, "dist", "web"), path: path.resolve(__dirname, "dist", "web"),
}, },
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = (env = {}) => merge(common(env), {
context: __dirname, context: __dirname,
entry: "./web/index.jsx", entry: "./web/index.jsx",
output: { output: {
publicPath: "/plugin/subspace_storage/", publicPath: "/plugins/subspace_storage/",
filename: "bundle.js", filename: "bundle.js",
path: path.resolve(__dirname, "dist", "web"), path: path.resolve(__dirname, "dist", "web"),
}, },