Turbopack build: Implement error when using next start without --turbopack (#77678)
### What? This PR adds validation to ensure that the build tool used during `next build` matches the one used during `next start`. It prevents mismatches between Turbopack and Webpack builds. ### Why? When a project is built with Turbopack but started without the `--turbopack` flag (or vice versa), it can lead to unexpected behavior and errors. This change ensures consistency between build and runtime environments. ### How? - Added a constant `IS_TURBOPACK_BUILD_FILE` to track which build tool was used - Added validation in the server startup to check if the `--turbopack` flag matches the build tool that was used - Added appropriate error messages (669 and 670) to provide clear guidance when mismatches occur
Showing
Please
register
or
sign in
to comment