26 lines
680 B
TypeScript
Executable File
26 lines
680 B
TypeScript
Executable File
import type { NextConfig } from "next";
|
|
import path from "path";
|
|
import withSerwistInit from "@serwist/next";
|
|
|
|
const withSerwist = withSerwistInit({
|
|
swSrc: "src/sw.ts",
|
|
swDest: "public/sw.js",
|
|
disable: process.env.NODE_ENV === "development",
|
|
});
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
outputFileTracingRoot: path.join(__dirname, "../../"),
|
|
transpilePackages: ["@adventureos/shared", "@adventureos/db"],
|
|
serverExternalPackages: ["postgres"],
|
|
webpack: (config) => {
|
|
config.resolve.alias = {
|
|
...(config.resolve.alias ?? {}),
|
|
"@": path.join(__dirname, "src"),
|
|
};
|
|
return config;
|
|
},
|
|
};
|
|
|
|
export default withSerwist(nextConfig);
|