diff --git a/src/containers/docs.tsx b/src/containers/docs.tsx index 328061f..f8f839f 100644 --- a/src/containers/docs.tsx +++ b/src/containers/docs.tsx @@ -13,7 +13,11 @@ window.process = {cwd: () => ''}; export function DocsContainer(): JSX.Element { const [docsText, setDocsText] = React.useState(''); useEffect(() => { - fetch('./docs/language-docs.md') + const url = + location.hostname === 'localhost' + ? './docs/language-docs.md' + : 'https://raw.githubusercontent.com/mcnuttandrew/ivy/master/docs/language-docs.md'; + fetch(url) .then((x) => x.text()) .then((x) => setDocsText(x)) .catch((e) => console.error(e)); diff --git a/src/utils/stringify.ts b/src/utils/stringify.ts index f210def..274c8b1 100644 --- a/src/utils/stringify.ts +++ b/src/utils/stringify.ts @@ -1,5 +1,5 @@ // some dumb foot work to try to make both build and test envs happy // eslint-disable-next-line @typescript-eslint/no-var-requires -const stringify = require('json-stringify-pretty-compact'); -// import stringify from 'json-stringify-pretty-compact'; +// const stringify = require('json-stringify-pretty-compact'); +import stringify from 'json-stringify-pretty-compact'; export default stringify;