1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 15:33:44 +01:00

make font url relative

This commit is contained in:
Gamerboy59 2023-09-27 01:23:46 +02:00 committed by GitHub
parent 8c1878267b
commit 2f6078ac1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 7 deletions

View File

@ -1,2 +1,2 @@
// FontAwesome
$fa-font-path: "webfonts/vendor/@fortawesome/fontawesome-free";
$fa-font-path: "webfonts";

21
webpack.mix.js vendored
View File

@ -12,11 +12,20 @@ const mix = require('laravel-mix');
*/
mix.js('resources/js/app.js', 'public/js').postCss('resources/css/app.css', 'public/css');
mix.sass('resources/sass/app.scss', 'public/css');
mix.options({
fileLoaderDirs: {
fonts: 'css/webfonts'
}
});
mix.sass('resources/sass/app.scss', 'public/css').options({
processCssUrls: false
}).copy(
'node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf',
'public/webfonts/webfa-regular-400.ttf'
).copy(
'node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2',
'public/webfonts/webfa-regular-400.woff2'
).copy(
'node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf',
'public/webfonts/webfa-solid-900.ttf'
).copy(
'node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2',
'public/webfonts/webfa-solid-900.woff2'
);
mix.postCss('resources/css/light.css', 'public/css');
mix.postCss('resources/css/dark.css', 'public/css');