Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled, { css } from 'styled-components';

import { component as LeftPointer } from 'public/images/icons/left-pointer.svg';
import { component as RightPointer } from 'public/images/icons/right-pointer.svg';
import LeftPointer from 'public/images/icons/left-pointer.svg';
import RightPointer from 'public/images/icons/right-pointer.svg';

export const Wrapper = styled.div`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion components/shared/atoms/Logo/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from 'next/link';

import { component as LogoIcon } from 'public/images/logo.svg';
import LogoIcon from 'public/images/logo.svg';

const Logo = (): JSX.Element => (
<Link href="/" passHref>
Expand Down
5 changes: 0 additions & 5 deletions lib/withApolloClient.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Head from 'next/head';
import { ApolloClient, ApolloLink, HttpLink, InMemoryCache, ApolloProvider } from '@apollo/client';
import fetch from 'isomorphic-unfetch';

Expand Down Expand Up @@ -186,10 +185,6 @@ function withApollo(PageComponent, { ssr = true } = {}) {
console.error('Error while running `getDataFromTree`', error);
}
}

// getDataFromTree does not call componentWillUnmount
// head side effect therefore need to be cleared manually
Head.rewind();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

return {
Expand Down
4 changes: 4 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Comment on lines +3 to +6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was added automatically

12 changes: 2 additions & 10 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@
/* eslint-disable no-param-reassign */

const dotenv = require('dotenv');
const withPlugins = require('next-compose-plugins');
const nextImages = require('next-images');
const nextFonts = require('next-fonts');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was needed when Nextjs had no support for importing fonts without using plugins.

https://www.npmjs.com/package/next-fonts

const svgr = require('next-svgr');
const path = require('path');

dotenv.config();

const nextConfig = {
module.exports = {
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = {
fs: 'empty',
};
Comment on lines -17 to -19
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using something like node.fs: 'empty' replace it with resolve.fallback.fs: false.

https://webpack.js.org/migrate/5/

config.resolve.fallback.fs = false;
}

// add polyfills to all browsers
Expand Down Expand Up @@ -59,5 +53,3 @@ const nextConfig = {
polyfillsOptimization: true,
},
};

module.exports = withPlugins([[nextImages], [nextFonts], [svgr]], nextConfig);
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@
"isomorphic-unfetch": "^3.0.0",
"jest-extended": "^0.11.5",
"lodash": "^4.17.15",
"next": "10.2.3",
"next-compose-plugins": "^2.2.0",
"next-fonts": "^1.1.0",
"next-images": "^1.4.0",
"next-svgr": "^0.0.2",
"next-with-apollo": "^5.0.0",
"next": "11.1.4",
"polished": "^3.4.4",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion public/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,503 changes: 165 additions & 1,338 deletions yarn.lock

Large diffs are not rendered by default.