[Bug]: font files are not moved to _assets
directory on build #1153
Closed
Description
What version of Remix are you using?
1.1.1
What version of Node are you using? Minimum supported version is 14.
14.18.1
Steps to Reproduce
- Run
yarn create remix
to create a new remix project. - Install a fontsource package in this project, e.g:
yarn add @fontsource/aguafina-script
- Create the main style sheet: (source)
/* app/styles/main.css */
body { font-family: "Aguafina Script"; }
- Add the font style sheet and the main style sheet to
root.tsx
: (source)
// ...
import fontStyleUrl from "@fontsource/aguafina-script/index.css";
import mainStyleUrl from "~/styles/main.css";
export let links: LinksFunction = () => {
return [
{ rel: "stylesheet", href: fontStyleUrl },
{ rel: "stylesheet", href: mainStyleUrl }
]
}
// ...
- Run the development server:
yarn dev
and visit the page in you browser.
Expected Behavior
Font files (*.woff or *.woff2) from the fontsource package are copied to the _assets
folder. Also, the compiled version of the fontsource css points to these font files.
Actual Behavior
Font files are not copied to the _assets
folder. Browser receives HTTP 404 when trying to load the font.