Skip to content

Commit

Permalink
update nextJs to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Ruck committed Jul 13, 2019
1 parent 8f7202c commit 6125d89
Show file tree
Hide file tree
Showing 8 changed files with 390 additions and 833 deletions.
2 changes: 1 addition & 1 deletion packages/web/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["next/babel", "@zeit/next-typescript/babel"],
"presets": ["next/babel"],
"plugins": [
[
"styled-components",
Expand Down
2 changes: 2 additions & 0 deletions packages/web/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
2 changes: 0 additions & 2 deletions packages/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const withPlugins = require('next-compose-plugins');
const withTM = require('next-transpile-modules');
const withTypescript = require('@zeit/next-typescript');
const withLess = require('@zeit/next-less');
const path = require('path');

Expand Down Expand Up @@ -48,7 +47,6 @@ module.exports = withPlugins(
],
},
],
[withTypescript],
],
nextConfig,
);
3 changes: 1 addition & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"graphql-tag": "2.10.1",
"isomorphic-unfetch": "3.0.0",
"lodash.get": "4.4.2",
"next": "8.1.0",
"next": "9.0.1",
"next-compose-plugins": "2.2.0",
"prop-types": "15.7.2",
"react": "16.8.6",
Expand All @@ -42,7 +42,6 @@
"devDependencies": {
"@babel/core": "7.5.4",
"@types/lodash.get": "4.4.6",
"@types/next": "8.0.6",
"@types/react": "16.8.23",
"@types/styled-components": "4.1.18",
"@zeit/next-less": "1.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/web/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Document, {
Head,
Main,
NextDocumentContext,
DocumentContext,
NextScript,
} from 'next/document';
import { ServerStyleSheet } from 'styled-components';
Expand All @@ -11,7 +11,7 @@ interface IProps {
}

export default class MyDocument extends Document<IProps> {
public static async getInitialProps(ctx: NextDocumentContext) {
public static async getInitialProps(ctx: DocumentContext) {
const sheet = new ServerStyleSheet();
const originalRenderPage = ctx.renderPage;

Expand Down
58 changes: 37 additions & 21 deletions packages/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
{
"extends": "../tsconfig.settings.json",
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"],
"plugins": [
{
"name": "typescript-tslint-plugin",
"alwaysShowRuleFailuresAsWarnings": false,
"ignoreDefinitionFiles": true,
"configFile": "../tslint.json",
"suppressWhileTypeErrorsPresent": false,
"mockTypeScriptVersion": false
}
]
},
"exclude": [
"node_modules", "apollo-components.tsx"
]
}
"extends": "../tsconfig.settings.json",
"compileOnSave": false,
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
"lib": [
"dom",
"es6",
"es2017",
"esnext.asynciterable"
],
"plugins": [
{
"name": "typescript-tslint-plugin",
"alwaysShowRuleFailuresAsWarnings": false,
"ignoreDefinitionFiles": true,
"configFile": "../tslint.json",
"suppressWhileTypeErrorsPresent": false,
"mockTypeScriptVersion": false
}
],
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"module": "esnext",
"resolveJsonModule": true,
"isolatedModules": true
},
"exclude": [
"node_modules",
"apollo-components.tsx"
],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
]
}
4 changes: 2 additions & 2 deletions packages/web/types/NextContextWithApollo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NormalizedCacheObject } from 'apollo-cache-inmemory';
import ApolloClient from 'apollo-client';
import { NextContext } from 'next';
import { NextPageContext } from 'next';

export interface INextContextWithApollo extends NextContext {
export interface INextContextWithApollo extends NextPageContext {
apolloClient: ApolloClient<NormalizedCacheObject>;
}

0 comments on commit 6125d89

Please sign in to comment.