all repos — caroster @ 39fd63e38e2eea8a7945a6ea37cca60f0a1896cc

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

frontend/next.config.js (view raw)

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