ui: use esbuild-loader & chunk-splitting

This commit is contained in:
undefined committed 2021-08-07 19:52:57 +08:00
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,