code-surfer icon indicating copy to clipboard operation
code-surfer copied to clipboard

Usage in nextjs app withouth mdx deck

Open hardvain opened this issue 5 years ago • 2 comments

Hello, Is it possible to use this in a nextjs app preferably without the dependency of mdx-deck? I am fine with adding mdx deck as well but I was not able to get it work with nextjs app

hardvain avatar May 30 '20 08:05 hardvain

You could try to use the @code-surfer/standalone package, but it isn't documented. There are some usage examples here: https://github.com/pomber/code-surfer/tree/master/sites/book/src

(for something more ambitious wait for https://github.com/code-hike/codehike)

pomber avatar May 30 '20 16:05 pomber

I'm getting this error after adding @code-surfer/standalone as a dev dependency :confused::

   
error - ./node_modules/@code-surfer/themes/dist/themes.esm.js
Module not found: Can't resolve 'theme-ui' in '.\node_modules\@code-surfer\themes\dist'
Error: Cannot find module 'theme-ui'

EDIT: Installing theme-ui fixed the problem 😅

Although I'm having issues styling the code. The code elements seems to be scaled using transform is there a way to disable this?

JakubKoralewski avatar Jun 10 '20 09:06 JakubKoralewski