fix: remote plugin (#2831)
This commit is contained in:
parent
166521bcdb
commit
3510506db3
@ -31,7 +31,7 @@ export function getRemotePlugins(requirejs: any, pluginData: PluginData[] = []):
|
|||||||
requirejs.requirejs.config({
|
requirejs.requirejs.config({
|
||||||
waitSeconds: 120,
|
waitSeconds: 120,
|
||||||
paths: pluginData.reduce<Record<string, string>>((acc, cur) => {
|
paths: pluginData.reduce<Record<string, string>>((acc, cur) => {
|
||||||
acc[cur.packageName] = `${cur.url}?noExt`;
|
acc[cur.packageName] = cur.url;
|
||||||
return acc;
|
return acc;
|
||||||
}, {}),
|
}, {}),
|
||||||
});
|
});
|
||||||
|
@ -4,6 +4,8 @@ import path from 'path';
|
|||||||
import Application from '../../application';
|
import Application from '../../application';
|
||||||
import { getExposeUrl } from '../clientStaticUtils';
|
import { getExposeUrl } from '../clientStaticUtils';
|
||||||
import PluginManager from '../plugin-manager';
|
import PluginManager from '../plugin-manager';
|
||||||
|
//@ts-ignore
|
||||||
|
import { version } from '../../../package.json';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'pm',
|
name: 'pm',
|
||||||
@ -129,7 +131,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
return {
|
return {
|
||||||
...item.toJSON(),
|
...item.toJSON(),
|
||||||
url: getExposeUrl(item.packageName, PLUGIN_CLIENT_ENTRY_FILE),
|
url: `${getExposeUrl(item.packageName, PLUGIN_CLIENT_ENTRY_FILE)}?version=${version}`,
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user