-
Notifications
You must be signed in to change notification settings - Fork 1
[243] Upgrade next.js #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was added automatically |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| config.resolve.fallback.fs = false; | ||
| } | ||
|
|
||
| // add polyfills to all browsers | ||
|
|
@@ -59,5 +53,3 @@ const nextConfig = { | |
| polyfillsOptimization: true, | ||
| }, | ||
| }; | ||
|
|
||
| module.exports = withPlugins([[nextImages], [nextFonts], [svgr]], nextConfig); | ||
Large diffs are not rendered by default.
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.
https://nextjs.org/docs/upgrading#remove-headrewind