25
apps/web/next.config.ts
Executable file
25
apps/web/next.config.ts
Executable file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user