diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 5b934f5..662ab4b 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1,3 +1,3 @@ module.exports = { - extends: ["@minko-fe"] + extends: ['@minko-fe'], } diff --git a/package.json b/package.json index 256fb0d..c16daab 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "author": "hemengke1997 ", "license": "MIT", "dependencies": { - "@stdlib/regexp-regexp": "^0.0.8", "query-string": "^7.1.1" }, "devDependencies": { diff --git a/src/utils.ts b/src/utils.ts index 4cd0aa2..7906dd0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,11 +1,14 @@ import type { AtRule, ChildNode, Comment, Container, Declaration, Rule, Warning as postcssWarning } from 'postcss' import queryString from 'query-string' -import reRegExp from '@stdlib/regexp-regexp' import { maybeRegExpList } from './constant' import { filterPropList } from './filter-prop-list' import type { PxtoremOptions } from '.' import { defaultOptions } from '.' +function reRegExp() { + return /^\/((?:\\\/|[^\/])+)\/([imgy]*)$/ +} + export function initOptions(options?: PxtoremOptions) { return Object.assign({}, defaultOptions, options) }