all repos — caroster @ 3a6483727355d59a734458de22d13c6088c9ce29

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

frontend/next.config.js (view raw)

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