Skip to content

Commit

Permalink
fix: Change next-svg to babel react svg
Browse files Browse the repository at this point in the history
Signed-off-by: Sangam Kumar <[email protected]>
  • Loading branch information
sangamcse committed Aug 16, 2022
1 parent a72f82d commit 27846c0
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 1,616 deletions.
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
presets: ['next/babel'],
plugins: [
'inline-react-svg',
[
'module-resolver',
{
Expand Down
10 changes: 3 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
const path = require('path');
const withPlugins = require('next-compose-plugins');
const svgr = require('next-svgr');

module.exports = withPlugins([svgr], {
module.exports = {
pageExtensions: ['js', 'jsx'],
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
includePaths: ['./src/styles'],
},
images: {
domains: ['avatars.githubusercontent.com'],
},
});
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
"lodash": "4.17.21",
"luxon": "1.26.0",
"next": "12.2",
"next-compose-plugins": "2.2.1",
"next-mdx-remote": "4.1",
"next-seo": "5.5.0",
"next-svgr": "0.0.2",
"postcss": "8.4.16",
"postcss-preset-env": "6.7.0",
"react": "17.0",
Expand All @@ -47,6 +45,7 @@
"devDependencies": {
"@babel/core": "7.18.10",
"babel-eslint": "10.1.0",
"babel-plugin-inline-react-svg": "2.0.1",
"babel-plugin-module-resolver": "4.1.0",
"eslint": "8.22.0",
"eslint-config-next": "12.2.5",
Expand Down
1 change: 1 addition & 0 deletions src/components/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const Hero = () => {
className="rounded-full shadow-lg h-64 w-64 mb-8 sm:mr-16 sm:mb-0"
title="Sangam's avatar"
alt="Sangam's avatar"
priority
/>
</div>
</section>
Expand Down
Loading

1 comment on commit 27846c0

@vercel
Copy link

@vercel vercel bot commented on 27846c0 Aug 16, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

portfolio – ./

portfolio-sangamcse.vercel.app
portfolio-git-master-sangamcse.vercel.app
www.sangam.dev
sangam.dev

Please sign in to comment.