diff --git a/packages/less-modules/src/index.ts b/packages/less-modules/src/index.ts index 311df42a..58cd2b3b 100644 --- a/packages/less-modules/src/index.ts +++ b/packages/less-modules/src/index.ts @@ -74,6 +74,7 @@ const createLessModule = (lessLoaderOptions = {} as LessLoaderOptions) => { modules: { mode: 'local', // @ts-ignore + //πŸ’₯πŸ”₯πŸš¨πŸšΈπŸš«β›”οΈπŸ”„ Upgrade `@types/react-dev-utils` getLocalIdent: getCSSModuleLocalIdent, }, }, diff --git a/packages/stylus-modules/src/index.ts b/packages/stylus-modules/src/index.ts index ff603f21..97b46023 100644 --- a/packages/stylus-modules/src/index.ts +++ b/packages/stylus-modules/src/index.ts @@ -157,15 +157,7 @@ const createLessModule = (stylusLoaderOptions = {} as StylusLoaderOptions) => { // Exclude all less files (including module files) from file-loader conf.module.rules = conf.module.rules.map((rule) => { if (typeof rule === 'object' && rule.oneOf) { - rule.oneOf = rule.oneOf.map((item) => { - if (typeof item.loader === 'string' && /(file-loader)/.test(item.loader)) { - if (Array.isArray(item.exclude)) { - item.exclude.push(sassRegex); - } - } - return item; - }); - rule.oneOf = loaders.concat(rule.oneOf); + loaders.forEach((item) => rule.oneOf.splice(rule.oneOf.length - 1, 0, item)); } return rule; });