cal.pub0.org/next.config.js

23 lines
749 B
JavaScript
Raw Normal View History

// https://www.npmjs.com/package/next-transpile-modules
// This makes our @calcom/prisma package from the monorepo to be transpiled and usable by API
2022-03-30 12:17:55 +00:00
const withTM = require("next-transpile-modules")(["@calcom/prisma", "@calcom/lib"]);
// use something like withPlugins([withTM], {}) if more plugins added later.
module.exports = withTM({
2022-03-23 21:22:57 +00:00
async rewrites() {
return [
// This redirects requests recieved at / the root to the /api/ folder.
{
source: "/:rest*",
destination: "/api/:rest*",
},
// This redirects requests to api/v*/ to /api/ passing version as a query parameter.
{
source: "/api/v:version/:rest*",
destination: "/api/:rest*?version=:version",
},
];
},
});