all repos — caroster @ e70935af9e0fac5a21e2c8dd999608ce06538783

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

frontend/next.config.js (view raw)

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