mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
core: add server-loader (#816)
This commit is contained in:
1 parent
3302480348
commit
97720efb65
57 files changed
+1328
-1131
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable global-require */
|
||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import { ESBuildMinifyPlugin } from 'esbuild-loader';
|
||||
import { EsbuildPlugin } from 'esbuild-loader';
|
||||
import { DuplicatesPlugin } from 'inspectpack/plugin';
|
||||
import ExtractCssPlugin from 'mini-css-extract-plugin';
|
||||
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
|
||||
@@ -214,7 +214,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
},
|
||||
},
|
||||
usedExports: true,
|
||||
minimizer: [new ESBuildMinifyPlugin({
|
||||
minimizer: [new EsbuildPlugin({
|
||||
css: true,
|
||||
minify: true,
|
||||
minifySyntax: true,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { assign } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import AutoComplete, { AutoCompleteOptions } from '.';
|
||||
import CustomSelectAutoCompleteFC from './components/CustomSelectAutoComplete';
|
||||
|
||||
@@ -56,5 +54,4 @@ export default class CustomSelectAutoComplete<Multi extends boolean> extends Aut
|
||||
}
|
||||
}
|
||||
|
||||
assign(CustomSelectAutoComplete, DOMAttachedObject);
|
||||
window.Hydro.components.CustomSelectAutoComplete = CustomSelectAutoComplete;
|
||||
@@ -1,7 +1,5 @@
|
||||
import { assign } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import AutoComplete from '.';
|
||||
import DomainSelectAutoCompleteFC from './components/DomainSelectAutoComplete';
|
||||
|
||||
@@ -42,5 +40,4 @@ export default class DomainSelectAutoComplete extends AutoComplete {
|
||||
}
|
||||
}
|
||||
|
||||
assign(DomainSelectAutoComplete, DOMAttachedObject);
|
||||
window.Hydro.components.DomainSelectAutoComplete = DomainSelectAutoComplete;
|
||||
@@ -1,7 +1,5 @@
|
||||
import { assign } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import AutoComplete, { AutoCompleteOptions } from '.';
|
||||
import FileSelectAutoCompleteFC from './components/FileSelectAutoComplete';
|
||||
|
||||
@@ -59,5 +57,4 @@ export default class FileSelectAutoComplete<Multi extends boolean> extends AutoC
|
||||
}
|
||||
}
|
||||
|
||||
assign(FileSelectAutoComplete, DOMAttachedObject);
|
||||
window.Hydro.components.FileSelectAutoComplete = FileSelectAutoComplete;
|
||||
@@ -1,7 +1,5 @@
|
||||
import { assign } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import AutoComplete from '.';
|
||||
import ProblemSelectAutoCompleteFC from './components/ProblemSelectAutoComplete';
|
||||
|
||||
@@ -44,5 +42,4 @@ export default class ProblemSelectAutoComplete extends AutoComplete {
|
||||
}
|
||||
}
|
||||
|
||||
assign(ProblemSelectAutoComplete, DOMAttachedObject);
|
||||
window.Hydro.components.ProblemSelectAutoComplete = ProblemSelectAutoComplete;
|
||||
@@ -1,7 +1,5 @@
|
||||
import { assign } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import AutoComplete, { AutoCompleteOptions } from '.';
|
||||
import UserSelectAutoCompleteFC from './components/UserSelectAutoComplete';
|
||||
|
||||
@@ -49,5 +47,4 @@ export default class UserSelectAutoComplete<Multi extends boolean> extends AutoC
|
||||
}
|
||||
}
|
||||
|
||||
assign(UserSelectAutoComplete, DOMAttachedObject);
|
||||
window.Hydro.components.UserSelectAutoComplete = UserSelectAutoComplete;
|
||||
@@ -1,4 +1,3 @@
|
||||
import { assign } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
@@ -108,5 +107,4 @@ export default class AutoComplete extends DOMAttachedObject {
|
||||
}
|
||||
}
|
||||
|
||||
assign(AutoComplete, DOMAttachedObject);
|
||||
window.Hydro.components.autocomplete = AutoComplete;
|
||||
@@ -1,5 +1,4 @@
|
||||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import { zIndexManager } from 'vj/utils';
|
||||
|
||||
@@ -145,5 +144,3 @@ export default class DomDialog extends DOMAttachedObject {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(DomDialog, DOMAttachedObject);
|
||||
@@ -1,5 +1,4 @@
|
||||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import TextareaHandler from 'vj/components/editor/textareaHandler';
|
||||
import Notification from 'vj/components/notification';
|
||||
@@ -102,5 +101,3 @@ export default class CommentBox extends DOMAttachedObject {
|
||||
this.detach();
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(CommentBox, DOMAttachedObject);
|
||||
@@ -1,4 +1,3 @@
|
||||
import _ from 'lodash';
|
||||
import Drop from 'tether-drop';
|
||||
import responsiveCutoff from 'vj/breakpoints.json';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
@@ -49,5 +48,3 @@ export default class Dropdown extends DOMAttachedObject {
|
||||
this.$dom.trigger('vjDropdownHide');
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(Dropdown, DOMAttachedObject);
|
||||
@@ -1,5 +1,4 @@
|
||||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import { nanoid } from 'nanoid';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import Notification from 'vj/components/notification';
|
||||
@@ -281,5 +280,3 @@ export default class Editor extends DOMAttachedObject {
|
||||
this.editor.setPosition({ lineNumber: range.endLineNumber, column: range.endColumn });
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(Editor, DOMAttachedObject);
|
||||
@@ -1,4 +1,3 @@
|
||||
import _ from 'lodash';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import Editor from './index';
|
||||
|
||||
@@ -28,5 +27,3 @@ export default class TextareaHandler extends DOMAttachedObject {
|
||||
this.$dom.focus();
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(TextareaHandler, DOMAttachedObject);
|
||||
@@ -1,5 +1,4 @@
|
||||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import { delay } from 'vj/utils';
|
||||
import Marker from './Marker';
|
||||
@@ -54,5 +53,3 @@ export default class MarkerReactive extends DOMAttachedObject {
|
||||
super.detach();
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(MarkerReactive, DOMAttachedObject);
|
||||
@@ -1,5 +1,4 @@
|
||||
import $ from 'jquery';
|
||||
import _ from 'lodash';
|
||||
import DOMAttachedObject from 'vj/components/DOMAttachedObject';
|
||||
import { delay } from 'vj/utils';
|
||||
|
||||
@@ -74,5 +73,3 @@ export default class Rotator extends DOMAttachedObject {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(Rotator, DOMAttachedObject);
|
||||
@@ -49,5 +49,3 @@ export default class StyledTable extends DOMAttachedObject {
|
||||
this.$header.trigger('sticky_kit:detach');
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(StyledTable, DOMAttachedObject);
|
||||
@@ -47,5 +47,3 @@ export default class Tooltip extends DOMAttachedObject {
|
||||
this.drop.open();
|
||||
}
|
||||
}
|
||||
|
||||
_.assign(Tooltip, DOMAttachedObject);
|
||||
@@ -10,22 +10,7 @@ export interface Context {
|
||||
broadcast: Context['emit'];
|
||||
}
|
||||
|
||||
export class Context extends cordis.Context {
|
||||
/** @deprecated use `ctx.root` instead */
|
||||
get app() {
|
||||
return this.root;
|
||||
}
|
||||
|
||||
/** @deprecated use `root.config` instead */
|
||||
get options() {
|
||||
return this.root.config;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Context {
|
||||
export type Associate<P extends string, C extends Context = Context> = cordis.Context.Associate<P, C>;
|
||||
}
|
||||
|
||||
export class Context extends cordis.Context { }
|
||||
export type MainScope = cordis.MainScope<Context>;
|
||||
export type EffectScope = cordis.EffectScope<Context>;
|
||||
export type ForkScope = cordis.ForkScope<Context>;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"cli": false
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "^5.10.2",
|
||||
"@blueprintjs/core": "^5.10.3",
|
||||
"@fontsource/dm-mono": "^5.0.20",
|
||||
"@fontsource/fira-code": "^5.0.18",
|
||||
"@fontsource/inconsolata": "^5.0.18",
|
||||
@@ -23,7 +23,7 @@
|
||||
"@fontsource/roboto-mono": "^5.0.18",
|
||||
"@fontsource/source-code-pro": "^5.0.18",
|
||||
"@fontsource/ubuntu-mono": "^5.0.20",
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@simplewebauthn/browser": "7.4.0",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@types/gulp-if": "^0.0.34",
|
||||
@@ -34,13 +34,13 @@
|
||||
"@types/nunjucks": "^3.2.6",
|
||||
"@types/pickadate": "^3.5.35",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/react": "^18.3.1",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/redux-logger": "^3.0.13",
|
||||
"@types/webpack-env": "^1.18.5",
|
||||
"@vscode/codicons": "^0.0.36",
|
||||
"ajv": "^8.13.0",
|
||||
"allotment": "^1.20.1",
|
||||
"ajv": "^8.14.0",
|
||||
"allotment": "^1.20.2",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"browser-update": "^3.3.51",
|
||||
"chalk": "^5.3.0",
|
||||
@@ -48,14 +48,14 @@
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"clipboard": "^2.0.11",
|
||||
"copy-webpack-plugin": "^12.0.2",
|
||||
"cordis": "3.13.3",
|
||||
"cordis": "3.16.0",
|
||||
"css-loader": "^6.11.0",
|
||||
"diff": "^5.2.0",
|
||||
"diff-dom": "^5.1.3",
|
||||
"echarts": "^5.5.0",
|
||||
"emojis-keywords": "2.0.0",
|
||||
"emojis-list": "2.1.0",
|
||||
"esbuild-loader": "^2.21.0",
|
||||
"esbuild-loader": "^4.1.0",
|
||||
"fancy-log": "^2.0.0",
|
||||
"flatpickr": "^4.6.13",
|
||||
"graphiql": "^2.4.7",
|
||||
@@ -127,7 +127,7 @@
|
||||
"dependencies": {
|
||||
"ansi_up": "^6.0.2",
|
||||
"cssfilter": "^0.0.10",
|
||||
"esbuild": "0.18.20",
|
||||
"esbuild": "0.21.4",
|
||||
"fs-extra": "^11.2.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsesc": "^3.0.2",
|
||||
|
||||
Reference in new issue
Block a user