mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: add experimental pnpm support
This commit is contained in:
1 parent
6c4bd6c21d
commit
188a8c6ed0
12 files changed
+71
-20
No files matched your search
@@ -1,8 +1,7 @@
|
||||
import AnsiUp from 'ansi_up';
|
||||
import moment from 'moment-timezone';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import { moment, ObjectID } from 'hydrooj';
|
||||
|
||||
export { size, formatSeconds } from '@hydrooj/utils/lib/utils';
|
||||
export { size, formatSeconds } from 'hydrooj';
|
||||
|
||||
const AU = new AnsiUp();
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const yaml = require('js-yaml');
|
||||
const serialize = require('serialize-javascript');
|
||||
const { serialize, fs, yaml } = require('hydrooj');
|
||||
const nunjucks = require('nunjucks');
|
||||
const jsesc = require('jsesc');
|
||||
const argv = require('cac')().parse();
|
||||
|
||||
@@ -128,7 +128,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
const p = pathData.module.resource.replace(/\\/g, '/');
|
||||
const filename = p.split('/').pop();
|
||||
if (p.includes('node_modules')) {
|
||||
const extra = p.split('node_modules')[1];
|
||||
const extra = p.split('node_modules/').pop();
|
||||
const moduleName = extra.split('/')[0];
|
||||
if (extra.includes('@fontsource')) {
|
||||
return `fonts/${filename}?[hash:6]`;
|
||||
@@ -198,7 +198,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
test: /[\\/]node_modules[\\/].+\.([jt]sx?|json|yaml)$/,
|
||||
priority: -10,
|
||||
name(module) {
|
||||
const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
|
||||
const packageName = module.context.replace(/\\/g, '/').split('node_modules/').pop().split('/')[0];
|
||||
if (packageName === 'monaco-editor-nls') {
|
||||
return `i.monaco.${module.userRequest.split('/').pop().split('.')[0]}`;
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
"redux-promise-middleware": "^6.1.3",
|
||||
"redux-thunk": "^2.4.2",
|
||||
"rupture": "^0.7.1",
|
||||
"schemastery": "^3.6.1",
|
||||
"slideout": "^1.0.1",
|
||||
"sticky-kit": "^1.1.3",
|
||||
"tether": "1.4.7",
|
||||
|
||||
Reference in new issue
Block a user