Skip to content

Commit

Permalink
Merge pull request #170 from Web-Dev-Path/fix/next-pwa
Browse files Browse the repository at this point in the history
Fix invalid next.config.js due to changes in newer next.js version
  • Loading branch information
cherylli authored May 25, 2023
2 parents be28a0a + 5e649fc commit c1fda52
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 180 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": ["next/babel"],
"plugins": [
[
"styled-components",
{
"ssr": true,
"displayName": true,
"preprocess": false
}
]
]
}
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- normalized font sizes
- installed yarn
- normalized buttons' and links' styling
- updated `package.json` commands for macOs
- updated `package.json` commands for macOS
- swipeable CardsColumns.js on mobile

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

### Fixed

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

### Fixed

Expand All @@ -97,3 +97,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- adjusted contact form message on mobile
- blog container and title styling
- blog card container tags overflowing
- fix invalid next.config file
1 change: 0 additions & 1 deletion components/mailchimp/NewsletterForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createRef, useState } from 'react';
import Image from 'next/image';
import { decode } from 'html-entities';
import ReCAPTCHA from 'react-google-recaptcha';
import Container from '@/components/containers/Container';
import { NewsLetterSubmitButton } from '@/components/buttons/SubmitButton';
import S from './styles';

Expand Down
1 change: 0 additions & 1 deletion components/mailchimp/NewsletterForm/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export default {
InputEmail,
InputName,
Input,
Form,
FormError,
FormInfo,
FormSending,
Expand Down
35 changes: 6 additions & 29 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const withPWA = require('next-pwa');
const withPWA = require('next-pwa')({
dest: 'public',
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === 'development',
});

module.exports = withPWA({
pwa: {
dest: 'public',
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === 'development',
},
i18n: {
locales: ['en'],
defaultLocale: 'en',
Expand All @@ -19,26 +18,4 @@ module.exports = withPWA({
},
],
},
compiler: {
// see https://styled-components.com/docs/tooling#babel-plugin for more info on the options.
styledComponents:
true |
{
// Enabled by default in development, disabled in production to reduce file size,
// setting this will override the default for all environments.
displayName: true,
// Enabled by default.
ssr: true,
// Enabled by default.
fileName: true,
// Empty by default.
topLevelImportPaths: '',
// Defaults to ["index"].
meaninglessFileNames: '',
// Enabled by default.
cssProp: true,
// Empty by default.
namespace: '',
},
},
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@sendgrid/mail": "^7.7.0",
"html-entities": "^2.3.2",
"next": "^13.1.6",
"next-pwa": "^5.5.4",
"next-pwa": "^5.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-recaptcha": "^2.1.0",
Expand All @@ -33,6 +33,7 @@
"swiper": "^8.2.2"
},
"devDependencies": {
"babel-plugin-styled-components": "^2.1.1",
"husky": "^8.0.0",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
Expand Down
2 changes: 1 addition & 1 deletion styles/pages/contactStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const YellowBracket = styled(Bracket)`
`)}
${m.desktopBreakpointPlus(css`
top: 25%;
top: 45%;
right: 140%;
`)}
`;
Expand Down
Loading

0 comments on commit c1fda52

Please sign in to comment.