Skip to content

Commit

Permalink
fix: ensure we don't have font filenames prefixed with -
Browse files Browse the repository at this point in the history
resolves #174
  • Loading branch information
danielroe committed Jun 25, 2024
1 parent c6deeba commit dfa252a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export function setupPublicAssetStrategy(options: ModuleOptions['assets'] = {})
if ('url' in source && hasProtocol(source.url, { acceptRelative: true })) {
source.url = source.url.replace(/^\/\//, 'https://')
const file = [
filename(source.url.replace(/\?.*/, '')),
// TODO: investigate why negative ignore pattern below is being ignored
filename(source.url.replace(/\?.*/, '').replace(/^-+/, '')),
hash(source) + (extname(source.url) || formatToExtension(source.format) || ''),
].filter(Boolean).join('-')

Expand Down

0 comments on commit dfa252a

Please sign in to comment.