-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from charliewilco/dep-updates
adding updated deps
- Loading branch information
Showing
12 changed files
with
2,803 additions
and
1,535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,20 @@ | ||
const { PHASE_PRODUCTION_SERVER } = | ||
process.env.NODE_ENV === 'development' | ||
? {} | ||
: !process.env.NOW_REGION | ||
? require('next/constants') | ||
: require('next-server/constants'); | ||
|
||
const raw = { | ||
test: /\.txt$/, | ||
use: 'raw-loader' | ||
}; | ||
|
||
const withMDX = require('@next/mdx')(); | ||
const withCSS = require('@zeit/next-css'); | ||
|
||
const webpack = config => { | ||
config.module.rules.push(raw); | ||
return config; | ||
}; | ||
|
||
module.exports = (phase, { defaultConfig }) => { | ||
if (phase === PHASE_PRODUCTION_SERVER) { | ||
// Config used to run in production. | ||
|
||
return { | ||
pageExtensions: ['js', 'jsx', 'mdx'], | ||
webpack | ||
}; | ||
} | ||
// ✅ Put the require call here. | ||
|
||
const withCSS = require('@zeit/next-css'); | ||
const withTypescript = require('@zeit/next-typescript'); | ||
const withMDX = require('@zeit/next-mdx')({ | ||
extension: /\.mdx?$/ | ||
}); | ||
|
||
return withTypescript( | ||
withCSS( | ||
withMDX({ | ||
target: 'serverless', | ||
pageExtensions: ['js', 'jsx', 'mdx'], | ||
webpack | ||
}) | ||
) | ||
); | ||
}; | ||
module.exports = withCSS( | ||
withMDX({ | ||
target: 'serverless', | ||
pageExtensions: ['tsx', 'js', 'jsx', 'mdx'], | ||
webpack | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
import App, { Container } from 'next/app'; | ||
import App from 'next/app'; | ||
import * as React from 'react'; | ||
import Layout from '../components/layout'; | ||
import MDXProvider from '@mdx-js/tag/dist/mdx-provider'; | ||
import { MDXProvider } from '@mdx-js/react'; | ||
|
||
import * as components from '../components/markdown-map'; | ||
|
||
export default class MyApp extends App { | ||
static async getInitialProps({ Component, ctx }) { | ||
let pageProps = {}; | ||
|
||
if (Component.getInitialProps) { | ||
pageProps = await Component.getInitialProps(ctx); | ||
} | ||
|
||
return { pageProps }; | ||
} | ||
|
||
render() { | ||
public render(): JSX.Element { | ||
const { Component, pageProps } = this.props; | ||
return ( | ||
<Container> | ||
<MDXProvider components={components}> | ||
<Layout> | ||
<Component {...pageProps} /> | ||
</Layout> | ||
</MDXProvider> | ||
</Container> | ||
<MDXProvider components={components}> | ||
<Layout> | ||
<Component {...pageProps} /> | ||
</Layout> | ||
</MDXProvider> | ||
); | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b144816
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: