Skip to content

Commit

Permalink
bump nextJS to v15 (#4630)
Browse files Browse the repository at this point in the history
* bump nextJS to v15

* make turbopack depends on env var
  • Loading branch information
Lendemor authored Jan 15, 2025
1 parent fbf9524 commit 9fe8e6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions reflex/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ class EnvironmentVariables:
# The maximum size of the reflex state in kilobytes.
REFLEX_STATE_SIZE_LIMIT: EnvVar[int] = env_var(1000)

# Whether to use the turbopack bundler.
REFLEX_USE_TURBOPACK: EnvVar[bool] = env_var(True)


environment = EnvironmentVariables()

Expand Down
2 changes: 1 addition & 1 deletion reflex/constants/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Commands(SimpleNamespace):
"@emotion/react": "11.13.3",
"axios": "1.7.7",
"json5": "2.2.3",
"next": "14.2.16",
"next": "15.1.4",
"next-sitemap": "4.2.3",
"next-themes": "0.4.3",
"react": "18.3.1",
Expand Down
6 changes: 5 additions & 1 deletion reflex/utils/prerequisites.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,14 @@ def initialize_web_directory():
init_reflex_json(project_hash=project_hash)


def _turbopack_flag() -> str:
return " --turbopack" if environment.REFLEX_USE_TURBOPACK.get() else ""


def _compile_package_json():
return templates.PACKAGE_JSON.render(
scripts={
"dev": constants.PackageJson.Commands.DEV,
"dev": constants.PackageJson.Commands.DEV + _turbopack_flag(),
"export": constants.PackageJson.Commands.EXPORT,
"export_sitemap": constants.PackageJson.Commands.EXPORT_SITEMAP,
"prod": constants.PackageJson.Commands.PROD,
Expand Down

0 comments on commit 9fe8e6f

Please sign in to comment.