mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: frontend api (#470) [skip-cache]
This commit is contained in:
1 parent
6d69e88739
commit
96fa6cc7b9
116 files changed
+599
-629
No files matched your search
@@ -51,7 +51,22 @@ export async function buildUI() {
|
||||
target: [
|
||||
'chrome60',
|
||||
],
|
||||
plugins: global.Hydro.ui.esbuildPlugins || [],
|
||||
plugins: [
|
||||
...(global.Hydro.ui.esbuildPlugins || []),
|
||||
{
|
||||
name: 'federation',
|
||||
setup(b) {
|
||||
b.onResolve({ filter: /^@hydrooj\/ui-default/ }, () => ({
|
||||
path: 'api',
|
||||
namespace: 'ui-default',
|
||||
}));
|
||||
b.onLoad({ filter: /.*/, namespace: 'ui-default' }, () => ({
|
||||
contents: 'module.exports = window.HydroExports;',
|
||||
loader: 'tsx',
|
||||
}));
|
||||
},
|
||||
},
|
||||
],
|
||||
minify: !process.env.DEV,
|
||||
});
|
||||
if (build.errors.length) console.error(build.errors);
|
||||
|
||||
Reference in new issue
Block a user