Skip to content

Commit

Permalink
disable next.js turbo mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Jun 21, 2024
1 parent 66af4e4 commit fe55066
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/metadata/getPageOgType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const OG_TYPE_DICT: Record<Route['pathname'], OGPageType> = {
'/api/proxy': 'Regular page',
'/api/csrf': 'Regular page',
'/api/healthz': 'Regular page',
'/api/config': 'Regular page',
'/auth/auth0': 'Regular page',
'/auth/unverified-email': 'Regular page',
};
Expand Down
1 change: 1 addition & 0 deletions lib/metadata/templates/description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/api/proxy': DEFAULT_TEMPLATE,
'/api/csrf': DEFAULT_TEMPLATE,
'/api/healthz': DEFAULT_TEMPLATE,
'/api/config': DEFAULT_TEMPLATE,
'/auth/auth0': DEFAULT_TEMPLATE,
'/auth/unverified-email': DEFAULT_TEMPLATE,
};
Expand Down
1 change: 1 addition & 0 deletions lib/metadata/templates/title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/api/proxy': '%network_name% node API proxy',
'/api/csrf': '%network_name% node API CSRF token',
'/api/healthz': '%network_name% node API health check',
'/api/config': '%network_name% node API health check',
'/auth/auth0': '%network_name% authentication',
'/auth/unverified-email': '%network_name% unverified email',
};
Expand Down
1 change: 1 addition & 0 deletions lib/mixpanel/getPageType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
'/api/proxy': 'Node API: Proxy',
'/api/csrf': 'Node API: CSRF token',
'/api/healthz': 'Node API: Health check',
'/api/config': 'Node API: Health check',
'/auth/auth0': 'Auth',
'/auth/unverified-email': 'Unverified email',
};
Expand Down
17 changes: 9 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ const moduleExports = {
productionBrowserSourceMaps: true,
experimental: {
instrumentationHook: process.env.NEXT_OPEN_TELEMETRY_ENABLED === 'true',
turbo: {
rules: {
'*.svg': {
loaders: [ '@svgr/webpack' ],
as: '*.js',
},
},
},
// disabled as it is not stable yet
// turbo: {
// rules: {
// '*.svg': {
// loaders: [ '@svgr/webpack' ],
// as: '*.js',
// },
// },
// },
},
};

Expand Down
1 change: 1 addition & 0 deletions nextjs/nextjs-routes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ declare module "nextjs-routes" {
| StaticRoute<"/accounts">
| DynamicRoute<"/address/[hash]/contract-verification", { "hash": string }>
| DynamicRoute<"/address/[hash]", { "hash": string }>
| StaticRoute<"/api/config">
| StaticRoute<"/api/csrf">
| StaticRoute<"/api/healthz">
| StaticRoute<"/api/log">
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/dev.preset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ dotenv \
-v NEXT_PUBLIC_GIT_TAG=$(git describe --tags --abbrev=0) \
-e $config_file \
-e $secrets_file \
-- bash -c './deploy/scripts/make_envs_script.sh && next dev -p $NEXT_PUBLIC_APP_PORT --turbo' |
-- bash -c './deploy/scripts/make_envs_script.sh && next dev -p $NEXT_PUBLIC_APP_PORT' |
pino-pretty

0 comments on commit fe55066

Please sign in to comment.