mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix webpack js-yaml resolve
This commit is contained in:
1 parent
d0569a6816
commit
e4c6cf258d
4 files changed
+15
-3
No files matched your search
@@ -101,7 +101,11 @@ export default function (env = {}) {
|
|||||||
resolve: {
|
resolve: {
|
||||||
modules: [root('node_modules'), root('../../node_modules')],
|
modules: [root('node_modules'), root('../../node_modules')],
|
||||||
extensions: ['.js', '.jsx'],
|
extensions: ['.js', '.jsx'],
|
||||||
alias: { vj: root() },
|
alias: {
|
||||||
|
vj: root(),
|
||||||
|
'js-yaml': root('utils/yamlCompact'),
|
||||||
|
'real-js-yaml': require.resolve('js-yaml'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.8.31",
|
"version": "4.8.32",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
|
import { getScoreColor } from '@hydrooj/utils/lib/status';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import { NamedPage } from 'vj/misc/Page';
|
import { NamedPage } from 'vj/misc/Page';
|
||||||
import Navigation from 'vj/components/navigation';
|
import Navigation from 'vj/components/navigation';
|
||||||
@@ -9,7 +10,6 @@ import delay from 'vj/utils/delay';
|
|||||||
import i18n from 'vj/utils/i18n';
|
import i18n from 'vj/utils/i18n';
|
||||||
import request from 'vj/utils/request';
|
import request from 'vj/utils/request';
|
||||||
import base64 from 'vj/utils/base64';
|
import base64 from 'vj/utils/base64';
|
||||||
import { getScoreColor } from 'vj/../utils/lib/status';
|
|
||||||
|
|
||||||
class ProblemPageExtender {
|
class ProblemPageExtender {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// eslint-disable-next-line import/no-unresolved
|
||||||
|
import yaml, { Schema } from 'real-js-yaml';
|
||||||
|
|
||||||
|
Schema.create = (arg1, arg2) => new Schema(arg1, arg2);
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-unresolved
|
||||||
|
export * from 'real-js-yaml';
|
||||||
|
export default yaml;
|
||||||
Reference in new issue
Block a user