Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(iframe) : Update next.config.js routing rules #456

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions frontend-next/.vercel/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> Why do I have a folder named ".vercel" in my project?
The ".vercel" folder is created when you link a directory to a Vercel project.

> What does the "project.json" file contain?
The "project.json" file contains:
- The ID of the Vercel project that you linked ("projectId")
- The ID of the user or team your Vercel project is owned by ("orgId")

> Should I commit the ".vercel" folder?
No, you should not share the ".vercel" folder with anyone.
Upon creation, it will be automatically added to your ".gitignore" file.
1 change: 1 addition & 0 deletions frontend-next/.vercel/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"orgId":"team_qlcI6dQq8pwGq8UhIX6NZad7","projectId":"prj_kgPqix8TD72Bk7BLFf09PK9J2Fly"}
52 changes: 24 additions & 28 deletions frontend-next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const nextConfig = {
}
],
destination:
`${PATH}/`,
`/iframe`,
},
],
fallback: [
Expand All @@ -28,43 +28,39 @@ const nextConfig = {
// and dynamic routes are checked (so no conflicts with [city]/[indicator] etc.)
// Catch-all to gatsby (js scripts, json data, etc.)

// {
// source: '/:slug*/',
// destination: `${PATH}/:slug*/`,
// },
// {
// source: '/:slug*',
// destination: `${PATH}/:slug*`,
// },
{
source: '/:slug*',
destination: `${PATH}/:slug*`,
},
{
source: '/:slug*/',
destination: `${PATH}/:slug*/`,
// has: [
// {
// type: 'query',
// key: 'slug',
// value: '(?!not-found|ifr).*',
has: [
{
type: 'query',
key: 'slug',
value: '(?!not-found|iframe).*',

// },
// ],
},
],
},
{
source: '/:slug*',
destination: `${PATH}/:slug*`,
// has: [
// {
// type: 'query',
// key: 'slug',
// // value is not "not-found" and "iframe".
// value: '(?!not-found|ifr).*',
// },
// ],
has: [
{
type: 'query',
key: 'slug',
// value is not "not-found" and "iframe".
value: '(?!not-found|iframe).*',
},
],
},
// This rewrite explicitly avoids rewriting for the "not-found" slug
// {
// source: '/not-found/',
// destination: '/not-found/',
// },
{
source: '/not-found/',
destination: '/not-found/',
},
],
};
},
Expand Down
Loading