Skip to content

Commit

Permalink
fix: svg plugin wrong logic
Browse files Browse the repository at this point in the history
  • Loading branch information
xueelf committed Dec 9, 2024
1 parent 69e065d commit 3e7ea3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function svgPlugin() {
setup(build) {
build.onLoad({ filter: /\.svg$/ }, async args => {
const raw_svg = await readFile(args.path, 'utf-8');
const svg = raw_svg.replace(/(\n|\s{2})/g, '');
const svg = raw_svg.replace(/(\n?\s+)/g, ' ');

return {
contents: svg,
Expand Down

0 comments on commit 3e7ea3e

Please sign in to comment.