Files
deer-flow/web/next.config.js

43 lines
1.0 KiB
JavaScript
Raw Normal View History

2025-04-17 12:02:23 +08:00
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
2025-04-17 14:26:41 +08:00
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT
2025-04-17 12:02:23 +08:00
import "./src/env.js";
/** @type {import("next").NextConfig} */
// DeerFlow leverages **Turbopack** during development for faster builds and a smoother developer experience.
// However, in production, **Webpack** is used instead.
//
// This decision is based on the current recommendation to avoid using Turbopack for critical projects, as it
// is still evolving and may not yet be fully stable for production environments.
2025-04-19 22:04:53 +08:00
const config = {
// For development mode
turbopack: {
rules: {
"*.md": {
loaders: ["raw-loader"],
as: "*.js",
2025-04-22 13:52:56 +08:00
},
},
},
// For production mode
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
use: "raw-loader",
});
return config;
},
// ... rest of the configuration.
output: "standalone",
2025-04-19 22:04:53 +08:00
};
2025-04-17 12:02:23 +08:00
export default config;