Skip to content

Commit

Permalink
Squash merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronchan32 committed Jun 2, 2024
1 parent 452e8f3 commit bf01516
Show file tree
Hide file tree
Showing 88 changed files with 8,290 additions and 4,900 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ node_modules
next-env.d.ts
next.config.ts
yarn.lock
**/.yaml
**/*.yaml
37 changes: 14 additions & 23 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,22 @@ const nextConfig = {
]
},
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find(rule =>
rule.test?.test?.('.svg')
);

config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/ // *.svg?url
},
// Convert all other *.svg imports to React components
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url
use: ['@svgr/webpack']
}
);

// Modify the file loader rule to ignore *.svg, since we have it handled now.
fileLoaderRule.exclude = /\.svg$/i;
config.module.rules.push({
test: /\.svg$/i,
use: ['@svgr/webpack']
});

return config;
},
experimental: {
turbo: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js'
}
}
}
}
};

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
"prepare": "husky"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.1.2",
"focus-trap-react": "^10.2.3",
"matter-js": "^0.19.0",
"next": "14.2.3",
"pathseg": "^1.2.1",
"poly-decomp": "^0.3.0",
"react": "^18",
"react-dom": "^18",
"svgpath": "^2.6.0"
"svgpath": "^2.6.0",
"keen-slider": "^6.8.6",
"react-draggable": "^4.4.6"
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
Expand Down
Loading

0 comments on commit bf01516

Please sign in to comment.