Skip to content

Commit

Permalink
rework preload.html.twig generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Pichat committed Oct 31, 2023
1 parent 2d0d0bd commit 33bc13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin-dev/themes/new-theme/.webpack/common.js
Expand Up @@ -448,7 +448,7 @@ module.exports = {
extensions: ['woff2'],
filter: /preload/,
// eslint-disable-next-line
replaceCallback: ({indexSource, linksAsString}) => indexSource.replace('{{{preloadLinks}}}', linksAsString.replace(/href="/g, 'href="{{ admin_dir }}')),
replaceCallback: ({indexSource, linksAsString}) => indexSource.replace('{{{preloadLinks}}}', linksAsString.replace(/href="/g, 'href="{{ asset(admin_dir ~ "').replace(/as="font"/g, `) }}" as="font"`)),
}),
new CssoWebpackPlugin({
forceMediaMerge: true,
Expand Down

0 comments on commit 33bc13b

Please sign in to comment.