all repos — caroster @ fe359e3d0bd28293a74106f4ce391f5127bce55f

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

frontend/next.config.js (view raw)

 1const {i18n} = require('./react-i18next.config');
 2const {NODE_ENV, DEV_TILES_URL, STRAPI_URL = 'http://localhost:1337', DEFAULT_LOCALE = 'share'} = 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,
19    DEV_TILES_URL,
20    DEFAULT_LOCALE
21  },
22  i18n,
23
24  trailingSlash: true,
25  async rewrites() {
26    return [
27      {
28        source: '/graphql',
29        destination: `${STRAPI_URL}/graphql`,
30      },
31      {
32        source: '/api/nauth/:slug*',
33        destination: `/api/nauth/:slug*`,
34      },
35      {
36        source: '/api/:slug*',
37        destination: `${STRAPI_URL}/api/:slug*`,
38      },
39      {
40        source: '/admin/:slug*',
41        destination: `${STRAPI_URL}/admin/:slug*`,
42      },
43      {
44        source: '/i18n/:slug*',
45        destination: `${STRAPI_URL}/i18n/:slug*`,
46      },
47      {
48        source: '/content-manager/:slug*',
49        destination: `${STRAPI_URL}/content-manager/:slug*`,
50      },
51      {
52        source: '/email-designer/:slug*',
53        destination: `${STRAPI_URL}/email-designer/:slug*`,
54      },
55    ];
56  },
57});