Skip to content

Commit

Permalink
use gatsby-plugin-root-import
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan4m1 committed Sep 25, 2024
1 parent b1cffb6 commit 4b0a10f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ module.exports = {
'gatsby-plugin-sitemap',
'gatsby-transformer-json',
'gatsby-transformer-sharp',
'@ayan4m1/gatsby-plugin-root-import',
{
resolve: 'gatsby-transformer-source-code',
options: {
Expand Down
8 changes: 0 additions & 8 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,3 @@ exports.createPages = async (options) => {
await createArticlePages(options);
await createTriviaPages(options);
};

exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
resolve: {
modules: [resolve(__dirname, 'src'), 'node_modules']
}
});
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"prepare": "husky"
},
"dependencies": {
"@ayan4m1/gatsby-plugin-root-import": "^2.0.10",
"@babel/core": "^7.25.2",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
signedsource "^1.0.0"
yargs "^15.3.1"

"@ayan4m1/gatsby-plugin-root-import@^2.0.10":
version "2.0.10"
resolved "https://registry.yarnpkg.com/@ayan4m1/gatsby-plugin-root-import/-/gatsby-plugin-root-import-2.0.10.tgz#e76e2bba2db59773a7c29ec9718dc31dcbde97ec"
integrity sha512-Now6pVcLPuCKexuBuwiUsZ4FTtB06iplmj6VcPN2jIt4cP0HvQqFnESzrJOO6g9lhWuQpUEyynWAQFiZRcoGpA==

"@babel/[email protected]":
version "7.12.11"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
Expand Down

0 comments on commit 4b0a10f

Please sign in to comment.