mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: use esbuild-loader & chunk-splitting
This commit is contained in:
1 parent
db9def7917
commit
e67c1c333a
9 files changed
+104
-54
No files matched your search
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import _ from 'lodash';
|
||||
import { escapeRegExp } from 'lodash';
|
||||
|
||||
export default function mapWebpackUrlPrefix(mapList) {
|
||||
const rules = mapList.map((mappingRule) => {
|
||||
const regex = mappingRule.prefix.split('/').map((s) => _.escapeRegExp(s)).join('[\\/\\\\]');
|
||||
const regex = mappingRule.prefix.split('/').map((s) => escapeRegExp(s)).join('[\\/\\\\]');
|
||||
return {
|
||||
from: new RegExp(`^${regex}`, mappingRule.flag),
|
||||
to: mappingRule.replace,
|
||||
|
||||
Reference in new issue
Block a user