Skip to content

Commit

Permalink
Remove workaround for asset imports from node_modules
Browse files Browse the repository at this point in the history
This workaround is no longer needed because
remix-run/remix#6813 has been fixed
upstream.
  • Loading branch information
lpsinger committed Sep 25, 2023
1 parent 73e115f commit 43f0c98
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/components/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import classnames from 'classnames'

import loaderImage from '~/../node_modules/nasawds/src/img/loader.gif'
import loaderImage from 'nasawds/src/img/loader.gif'

// Adapted from https://github.com/trussworks/react-uswds/blob/main/src/components/Icon/Icon.tsx
export default function Spinner({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.node {
& {
list-style: url('~/../node_modules/nasawds/src/img/usa-icons/chevron_right.svg');
list-style: url('nasawds/src/img/usa-icons/chevron_right.svg');
}

&[aria-expanded='true'] {
list-style: url('~/../node_modules/nasawds/src/img/usa-icons/expand_more.svg');
list-style: url('nasawds/src/img/usa-icons/expand_more.svg');
}

& [data-testid='checkbox'] {
Expand Down
14 changes: 7 additions & 7 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ import highlightStyle from 'highlight.js/styles/github.css'
// ])
// )
// )
import favicon_16 from '~/../node_modules/nasawds/src/img/favicons/favicon-16.png'
import favicon_40 from '~/../node_modules/nasawds/src/img/favicons/favicon-40.png'
import favicon_57 from '~/../node_modules/nasawds/src/img/favicons/favicon-57.png'
import favicon_72 from '~/../node_modules/nasawds/src/img/favicons/favicon-72.png'
import favicon_114 from '~/../node_modules/nasawds/src/img/favicons/favicon-114.png'
import favicon_144 from '~/../node_modules/nasawds/src/img/favicons/favicon-144.png'
import favicon_192 from '~/../node_modules/nasawds/src/img/favicons/favicon-192.png'
import favicon_16 from 'nasawds/src/img/favicons/favicon-16.png'
import favicon_40 from 'nasawds/src/img/favicons/favicon-40.png'
import favicon_57 from 'nasawds/src/img/favicons/favicon-57.png'
import favicon_72 from 'nasawds/src/img/favicons/favicon-72.png'
import favicon_114 from 'nasawds/src/img/favicons/favicon-114.png'
import favicon_144 from 'nasawds/src/img/favicons/favicon-144.png'
import favicon_192 from 'nasawds/src/img/favicons/favicon-192.png'
import themeStyle from '~/theme.css'

const favicons = {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/circulars._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { Anchor } from '~/components/Anchor'
import Hint from '~/components/Hint'
import { usePagination } from '~/lib/pagination'

import searchImg from '~/../node_modules/nasawds/src/img/usa-icons-bg/search--white.svg'
import searchImg from 'nasawds/src/img/usa-icons-bg/search--white.svg'

export async function loader({ request: { url } }: DataFunctionArgs) {
const { searchParams } = new URL(url)
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.endorsements/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import SegmentedCards from '~/components/SegmentedCards'
import { getFormDataString } from '~/lib/utils'
import type { BreadcrumbHandle } from '~/root/Title'

import loaderImage from '~/../node_modules/nasawds/src/img/loader.gif'
import loaderImage from 'nasawds/src/img/loader.gif'

export const handle: BreadcrumbHandle & SEOHandle = {
breadcrumb: 'Peer Endorsements',
Expand Down
6 changes: 3 additions & 3 deletions app/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

@use 'styles' with (
$theme-show-notifications: false,
$theme-image-path: '~/../node_modules/nasawds/src/img',
$theme-font-path: '~/../node_modules/nasawds/src/fonts'
$theme-image-path: 'nasawds/src/img',
$theme-font-path: 'nasawds/src/fonts'
);

@use 'uswds-core' as *;
Expand Down Expand Up @@ -110,7 +110,7 @@ h6 {
}

& > a:hover::after {
content: url('~/../node_modules/nasawds/src/img/usa-icons/link.svg');
content: url('nasawds/src/img/usa-icons/link.svg');
position: absolute;
padding-left: 1ex;
}
Expand Down

0 comments on commit 43f0c98

Please sign in to comment.