Skip to content

Commit

Permalink
chore: do not alter html in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed Dec 15, 2022
1 parent 5a8dc03 commit 9419e20
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions build/util.js
Expand Up @@ -110,28 +110,30 @@ export async function compile(file, dest, { external, globals, name, aliases, re
},
},
}),
debug
? undefined
: babel({
presets: [
[
'@babel/preset-env',
{
loose: true,
targets: { safari: '12' },
bugfixes: true,
},
...(debug
? []
: [
babel({
presets: [
[
'@babel/preset-env',
{
loose: true,
targets: { safari: '12' },
bugfixes: true,
},
],
],
],
extensions: ['.js'],
babelHelpers: 'bundled',
retainLines: true,
compact: false,
}),
modify({
find: /(>)\n\s+|\n\s+(<)/,
replace: (m, m1, m2) => `${m1 || ''} ${m2 || ''}`,
}),
extensions: ['.js'],
babelHelpers: 'bundled',
retainLines: true,
compact: false,
}),
modify({
find: /(>)\n\s+|\n\s+(<)/,
replace: (m, m1, m2) => `${m1 || ''} ${m2 || ''}`,
}),
]),
],
};

Expand Down

0 comments on commit 9419e20

Please sign in to comment.