Skip to content

Commit

Permalink
type: fix raw-modules type error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 24, 2023
1 parent c96ee1f commit 0e5e78c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/raw-modules/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const rawModules = (conf: Configuration, env: string, options = {} as ReactLibra
];
// 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 = loaders.concat(rule.oneOf);
if (typeof rule === 'object' && rule.oneOf && Array.isArray(rule.oneOf)) {
rule.oneOf = [...loaders, ...rule.oneOf];
}
return rule;
});
Expand Down

0 comments on commit 0e5e78c

Please sign in to comment.