Browse Source

[beta] Sandpack - new bundler (#4458)

* add new bundle for testing

* add timer

* update url

* update bundler version

* Remove temporary code

* Fix lint

* why?

* testing bundler url

* uncaught exception handling

* catch global errors on new bundler

* Try latest bundler

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
main
Danilo Woznica 3 years ago
committed by GitHub
parent
commit
3ab1245314
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .nvmrc
  2. 5
      beta/src/components/MDX/Sandpack/SandpackRoot.tsx

2
.nvmrc

@ -1 +1 @@
12.16.1 12.22.0

5
beta/src/components/MDX/Sandpack/SandpackRoot.tsx

@ -4,6 +4,7 @@
import * as React from 'react'; import * as React from 'react';
import {SandpackProvider} from '@codesandbox/sandpack-react'; import {SandpackProvider} from '@codesandbox/sandpack-react';
import {SandpackLogLevel} from '@codesandbox/sandpack-client';
import {CustomPreset} from './CustomPreset'; import {CustomPreset} from './CustomPreset';
import {createFileMap} from './utils'; import {createFileMap} from './utils';
@ -82,7 +83,9 @@ function SandpackRoot(props: SandpackProps) {
customSetup={{...setup, files: files}} customSetup={{...setup, files: files}}
autorun={autorun} autorun={autorun}
initMode="user-visible" initMode="user-visible"
initModeObserverOptions={{rootMargin: '1400px 0px'}}> initModeObserverOptions={{rootMargin: '1400px 0px'}}
bundlerURL="https://22530bfe.sandpack-bundler.pages.dev"
logLevel={SandpackLogLevel.None}>
<CustomPreset <CustomPreset
isSingleFile={isSingleFile} isSingleFile={isSingleFile}
showDevTools={showDevTools} showDevTools={showDevTools}

Loading…
Cancel
Save