Skip to content

Commit

Permalink
Fix broken styles loading in next.js dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikGuzei committed Nov 21, 2019
1 parent b402e3e commit 1b0f7fe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/widgets/layout/Layout.tsx
@@ -1,3 +1,4 @@
import Head from 'next/head';
import { useRouter } from 'next/router';
import React, { Fragment } from 'react';
import Container from '../container/Container';
Expand Down Expand Up @@ -82,6 +83,15 @@ export const Layout = ({ children, header }: IProps) => {

return (
<Fragment>
<Head>
{process.env.NODE_ENV !== 'production' && (
<link
rel="stylesheet"
type="text/css"
href={`/_next/static/css/styles.chunk.css?v=${Date.now()}`}
/>
)}
</Head>
<div className={styles.content}>
{header}
<Container>{children}</Container>
Expand Down

0 comments on commit 1b0f7fe

Please sign in to comment.