Skip to content

Commit

Permalink
fix(build): identify umi output assets reg match (#377)
Browse files Browse the repository at this point in the history
* fix(build): identify `umi` output assets reg match

* chore: update umi css assets reg
  • Loading branch information
fz6m authored and sorrycc committed Jun 23, 2022
1 parent 9e922a7 commit fd85c4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/preset-umi/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ umi build --clean

let ret: Record<string, string> = {};
for (const asset of stats.toJson().entrypoints['umi'].assets) {
if (/^umi\..+?\.js$/.test(asset.name)) {
if (/^umi(\..+)?\.js$/.test(asset.name)) {
ret['umi.js'] = asset.name;
}
if (/^umi\..+?\.css$/.test(asset.name)) {
if (/^umi(\..+)?\.css$/.test(asset.name)) {
ret['umi.css'] = asset.name;
}
}
Expand Down

0 comments on commit fd85c4e

Please sign in to comment.