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({
|
||||
waitSeconds: 120,
|
||||
paths: pluginData.reduce<Record<string, string>>((acc, cur) => {
|
||||
acc[cur.packageName] = `${cur.url}?noExt`;
|
||||
acc[cur.packageName] = cur.url;
|
||||
return acc;
|
||||
}, {}),
|
||||
});
|
||||
|
@ -4,6 +4,8 @@ import path from 'path';
|
||||
import Application from '../../application';
|
||||
import { getExposeUrl } from '../clientStaticUtils';
|
||||
import PluginManager from '../plugin-manager';
|
||||
//@ts-ignore
|
||||
import { version } from '../../../package.json';
|
||||
|
||||
export default {
|
||||
name: 'pm',
|
||||
@ -129,7 +131,7 @@ export default {
|
||||
try {
|
||||
return {
|
||||
...item.toJSON(),
|
||||
url: getExposeUrl(item.packageName, PLUGIN_CLIENT_ENTRY_FILE),
|
||||
url: `${getExposeUrl(item.packageName, PLUGIN_CLIENT_ENTRY_FILE)}?version=${version}`,
|
||||
};
|
||||
} catch {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user