mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
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:
1 parent
71804df3e0
commit
78ce6fc382
6 files changed
+6
-6
No files matched your search
@@ -2049,7 +2049,7 @@ async function startServer(args) {
|
||||
|
||||
let pluginPackagePath = require.resolve(path.posix.join(pluginInfo.requirePath, "package.json"));
|
||||
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
|
||||
|
||||
@@ -42,7 +42,7 @@ async function loadPlugins() {
|
||||
await __webpack_init_sharing__("default");
|
||||
for (let meta of pluginList) {
|
||||
try {
|
||||
await loadScript(`${basename}/plugin/${meta.name}/remoteEntry.js`);
|
||||
await loadScript(`${basename}/plugins/${meta.name}/remoteEntry.js`);
|
||||
let container = window[`plugin_${meta.name}`];
|
||||
if (!container) {
|
||||
throw new Error(`Plugin did not expose its container via plugin_${meta.name}`);
|
||||
|
||||
Reference in new issue
Block a user