Skip to content

Commit c1fda52

Browse files
authored
Merge pull request #170 from Web-Dev-Path/fix/next-pwa
Fix invalid next.config.js due to changes in newer next.js version
2 parents be28a0a + 5e649fc commit c1fda52

File tree

8 files changed

+181
-180
lines changed

8 files changed

+181
-180
lines changed

.babelrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"presets": ["next/babel"],
3+
"plugins": [
4+
[
5+
"styled-components",
6+
{
7+
"ssr": true,
8+
"displayName": true,
9+
"preprocess": false
10+
}
11+
]
12+
]
13+
}

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3737
- normalized font sizes
3838
- installed yarn
3939
- normalized buttons' and links' styling
40-
- updated `package.json` commands for macOs
40+
- updated `package.json` commands for macOS
4141
- swipeable CardsColumns.js on mobile
4242

4343
## 1.2.0
@@ -58,7 +58,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5858
- Contact us cards section to contact page
5959
- Linkedin link to footer
6060
- Next.js 13
61-
- Converting components into styled-components
6261

6362
### Fixed
6463

@@ -68,7 +67,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6867
- relative to absolute imports with aliases
6968
- updated to React 18 and Next.js latest
7069
- footer styling update + social media icons
71-
- improved LightHouse scores by optmizing images, creating a robots.txt file and adding proper alt tags
70+
- improved LightHouse scores by optimizing images, creating a robots.txt file and adding proper alt tags
7271
- updated 'about us' first section (our background, peer reviews, version control)
7372
- updated 'about us' section (our goals, our purpose)
7473
- updated mobile nav to automatically close when page route change is completed
@@ -89,6 +88,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8988
- Search functionality for blog posts
9089
- Styled components to Title component
9190
- Links to blog tags to show all posts with the same tag
91+
- Converting components into styled-components
9292

9393
### Fixed
9494

@@ -97,3 +97,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9797
- adjusted contact form message on mobile
9898
- blog container and title styling
9999
- blog card container tags overflowing
100+
- fix invalid next.config file

components/mailchimp/NewsletterForm/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createRef, useState } from 'react';
22
import Image from 'next/image';
33
import { decode } from 'html-entities';
44
import ReCAPTCHA from 'react-google-recaptcha';
5-
import Container from '@/components/containers/Container';
65
import { NewsLetterSubmitButton } from '@/components/buttons/SubmitButton';
76
import S from './styles';
87

components/mailchimp/NewsletterForm/styles.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ export default {
151151
InputEmail,
152152
InputName,
153153
Input,
154-
Form,
155154
FormError,
156155
FormInfo,
157156
FormSending,

next.config.js

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
const withPWA = require('next-pwa');
1+
const withPWA = require('next-pwa')({
2+
dest: 'public',
3+
register: true,
4+
skipWaiting: true,
5+
disable: process.env.NODE_ENV === 'development',
6+
});
27

38
module.exports = withPWA({
4-
pwa: {
5-
dest: 'public',
6-
register: true,
7-
skipWaiting: true,
8-
disable: process.env.NODE_ENV === 'development',
9-
},
109
i18n: {
1110
locales: ['en'],
1211
defaultLocale: 'en',
@@ -19,26 +18,4 @@ module.exports = withPWA({
1918
},
2019
],
2120
},
22-
compiler: {
23-
// see https://styled-components.com/docs/tooling#babel-plugin for more info on the options.
24-
styledComponents:
25-
true |
26-
{
27-
// Enabled by default in development, disabled in production to reduce file size,
28-
// setting this will override the default for all environments.
29-
displayName: true,
30-
// Enabled by default.
31-
ssr: true,
32-
// Enabled by default.
33-
fileName: true,
34-
// Empty by default.
35-
topLevelImportPaths: '',
36-
// Defaults to ["index"].
37-
meaninglessFileNames: '',
38-
// Enabled by default.
39-
cssProp: true,
40-
// Empty by default.
41-
namespace: '',
42-
},
43-
},
4421
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@sendgrid/mail": "^7.7.0",
2323
"html-entities": "^2.3.2",
2424
"next": "^13.1.6",
25-
"next-pwa": "^5.5.4",
25+
"next-pwa": "^5.6.0",
2626
"react": "^18.2.0",
2727
"react-dom": "^18.2.0",
2828
"react-google-recaptcha": "^2.1.0",
@@ -33,6 +33,7 @@
3333
"swiper": "^8.2.2"
3434
},
3535
"devDependencies": {
36+
"babel-plugin-styled-components": "^2.1.1",
3637
"husky": "^8.0.0",
3738
"lint-staged": "^13.0.3",
3839
"prettier": "^2.7.1",

styles/pages/contactStyles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const YellowBracket = styled(Bracket)`
6767
`)}
6868
6969
${m.desktopBreakpointPlus(css`
70-
top: 25%;
70+
top: 45%;
7171
right: 140%;
7272
`)}
7373
`;

0 commit comments

Comments
 (0)