Skip to content

Commit

Permalink
patched standard font rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjeanp committed Jul 22, 2024
1 parent 1df65ee commit 9d76e1c
Show file tree
Hide file tree
Showing 5 changed files with 3,887 additions and 16 deletions.
12 changes: 12 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @type {import('next').NextConfig} */

const path = require("path")



const nextConfig = {
basePath: process.env.GITHUB_ACTIONS ? "/pdf-kitchen" : "", // TODO: make this dynamic
Expand All @@ -10,6 +13,15 @@ const nextConfig = {
module.exports = {
...nextConfig,
webpack: (config, options) => {


const source = "node_modules/@react-pdf/layout/lib/index.js"
const patch = "src/patches/@react-pdf/layout/lib/index.js"
config.resolve.alias[path.resolve(__dirname, source)] = path.resolve(__dirname, patch)

// const cjs = "node_modules/@react-pdf/layout/lib/index.cjs"
// config.resolve.alias[path.resolve(__dirname, cjs)] = path.resolve(__dirname, to)

config.module.rules.push({
test: /\.md/,
use: [options.defaultLoaders.babel, '@mdx-js/loader'],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@mdx-js/loader": "^1.5.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^9.1.1",
"@react-pdf/renderer": "3.3.5",
"@react-pdf/renderer": "^3.4.4",
"@uiw/codemirror-extensions-langs": "^4.23.0",
"@uiw/codemirror-theme-gruvbox-dark": "^4.23.0",
"@uiw/react-codemirror": "^4.23.0",
Expand Down
1 change: 0 additions & 1 deletion src/components/Repl/Repl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const Repl: FC<ReplProps> = ({

return (
<>
{/* {loading && <Spinner />} */}

<StyledWrapper className="replWrapper">
<StyledCodePanel className="codePanel" active={activeTab === 'code'}>
Expand Down
Loading

0 comments on commit 9d76e1c

Please sign in to comment.