all repos — caroster @ 79cd68b76c662e9cd5d1940b2feba41767825cd9

[Octree] Group carpool to your event https://caroster.io

frontend/next.config.js (view raw)

 1const {NODE_ENV, STRAPI_URL = 'http://localhost:1337'} = process.env;
 2
 3const withPWA = require('next-pwa')({
 4  dest: 'public',
 5  disable: NODE_ENV !== 'production',
 6});
 7
 8module.exports = withPWA({
 9  swcMinify: true,
10  eslint: {
11    ignoreDuringBuilds: true,
12  },
13  typescript: {
14    ignoreBuildErrors: true,
15  },
16  env: {
17    STRAPI_URL: process.env.STRAPI_URL,
18  },
19
20  async rewrites() {
21    return [
22      {
23        source: '/graphql',
24        destination: `${STRAPI_URL}/graphql`,
25      },
26      {
27        source: '/api/:slug*',
28        destination: `${STRAPI_URL}/api/:slug*`,
29      },
30      {
31        source: '/admin/:slug*',
32        destination: `${STRAPI_URL}/admin/:slug*`,
33      },
34      {
35        source: '/i18n/:slug*',
36        destination: `${STRAPI_URL}/i18n/:slug*`,
37      },
38      {
39        source: '/content-manager/:slug*',
40        destination: `${STRAPI_URL}/content-manager/:slug*`,
41      },
42      {
43        source: '/email-designer/:slug*',
44        destination: `${STRAPI_URL}/email-designer/:slug*`,
45      },
46    ];
47  },
48});