mirror of
https://github.com/primer/css.git
synced 2024-12-29 09:06:07 +03:00
fix: load static primer.css in production
This commit is contained in:
parent
209bef3d7e
commit
3074c9eaa5
@ -2,12 +2,13 @@ import Router from 'next/router'
|
||||
import getConfig from 'next/config'
|
||||
import TreeModel from 'tree-model'
|
||||
|
||||
export const CommonStyles = () => (
|
||||
<>
|
||||
<link rel="stylesheet" href={assetPrefix + '/_next/static/css/styles.chunk.css'} />
|
||||
<link rel="stylesheet" href={getAssetPath('github/styleguide.css')} />
|
||||
</>
|
||||
)
|
||||
export const CommonStyles = () => {
|
||||
const sheets = [
|
||||
config.production ? getAssetPath('primer.css') : assetPrefix + '/_next/static/css/styles.chunk.css',
|
||||
getAssetPath('github/styleguide.css')
|
||||
]
|
||||
return sheets.map(href => <link href={href} rel="stylesheet" />)
|
||||
}
|
||||
|
||||
export const CommonScripts = () => (
|
||||
<script src={getAssetPath('github/styleguide.js')} />
|
||||
|
Loading…
Reference in New Issue
Block a user