chore: fix pdf fonts fetching for local development (#2950) [skip e2e]
This commit is contained in:
committed by
GitHub
parent
9d79bbfeb0
commit
6efa5f4522
@@ -90,7 +90,11 @@ const FONT_VARIANT_TO_FONT_OPTIONS: Record<FontVariant, { fontWeight: FontWeight
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const FONT_ASSETS_BASE_PATH = 'https://assets.standardnotes.com/fonts'
|
const FONT_ASSETS_BASE_PATH =
|
||||||
|
process.env.NODE_ENV === 'development'
|
||||||
|
? 'http://localhost:3001/assets/fonts'
|
||||||
|
: 'https://assets.standardnotes.com/fonts'
|
||||||
|
|
||||||
const FALLBACK_FONT_SOURCE = '/noto-sans/NotoSans-Regular.ttf'
|
const FALLBACK_FONT_SOURCE = '/noto-sans/NotoSans-Regular.ttf'
|
||||||
|
|
||||||
export const FALLBACK_FONT_FAMILY = FontFamily.Helvetica
|
export const FALLBACK_FONT_FAMILY = FontFamily.Helvetica
|
||||||
|
|||||||
@@ -29,6 +29,16 @@ module.exports = (env, argv) => {
|
|||||||
devMiddleware: {
|
devMiddleware: {
|
||||||
writeToDisk: argv.writeToDisk,
|
writeToDisk: argv.writeToDisk,
|
||||||
},
|
},
|
||||||
|
proxy: {
|
||||||
|
'/assets': {
|
||||||
|
target: 'https://assets.standardnotes.com',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
pathRewrite: {
|
||||||
|
'^/assets': '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user