deer-flow/web/next.config.js
Leo Hui 9c3021a568
feat: add docker support (#104)
* init docker support

* chore: update Dockerfile and .dockerignore for improved build context and dependency management

* feat: add Docker support with Dockerfile, docker-compose, and .dockerignore for web application

* feat: update environment configuration and docker-compose for improved API integration

* docs: update Japanese and Chinese README files for consistency and clarity
2025-05-13 19:53:28 +08:00

43 lines
1.0 KiB
JavaScript

/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT
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.
const config = {
// For development mode
turbopack: {
rules: {
"*.md": {
loaders: ["raw-loader"],
as: "*.js",
},
},
},
// For production mode
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
use: "raw-loader",
});
return config;
},
// ... rest of the configuration.
output: "standalone",
};
export default config;