aboutsummaryrefslogtreecommitdiff
path: root/packages/web/next.config.js
blob: 459ba517802bd4c04be87e27a562ffa4abe0e5c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
 * for Docker builds.
 */
import "./src/env.js";

/** @type {import("next").NextConfig} */
const config = {
	serverExternalPackages: ["onnxruntime-node", "@xenova/transformers"],
	webpack: (config, { isServer }) => {
		if (isServer) {
			config.externals.push("onnxruntime-node", "@xenova/transformers");
		}
		return config;
	},
};

export default config;