Skip to content

Commit

Permalink
chore(frontend): configure Next.js compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
MiracleHorizon committed Aug 9, 2024
1 parent a7315de commit bb066cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 6 additions & 0 deletions apps/frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import bundleAnalyzer from '@next/bundle-analyzer'

/** @type {import('next').NextConfig} */
const nextConfig = {
compiler: {
reactRemoveProperties: {
properties: ['^data-testid$', '^data-cy$']
},
removeConsole: true
},
env: {
SITE_DOMAIN: process.env.SITE_DOMAIN,
SERVER_API: process.env.SERVER_API
Expand Down
6 changes: 2 additions & 4 deletions apps/frontend/src/api/convert-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FetchException } from './exceptions/FetchException'
import { ABORT_TIMEOUT, HTTP_METHOD } from './config'
import { createImageProcessingFormData } from './helpers/createImageProcessingFormData'
import { PATH_API_CONVERT } from '@site/paths'
import { createApiURL, IS_PRODUCTION } from '@site/config'
import { createApiURL } from '@site/config'
import { useImageMutation } from '@api/hooks/useImageMutation'
import type { MutationPayload } from './types'
import type { DownloadableFile } from '@app-types/DownloadableFile'
Expand Down Expand Up @@ -35,9 +35,7 @@ const convertImage = async (formData: FormData): Promise<Blob> => {
})
return Promise.reject(error)
} catch (err) {
if (!IS_PRODUCTION) {
console.log(err)
}
console.log(err)

throw new FetchException({
cause: err
Expand Down
6 changes: 2 additions & 4 deletions apps/frontend/src/api/resize-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FetchException } from './exceptions/FetchException'
import { ABORT_TIMEOUT, HTTP_METHOD } from './config'
import { createImageProcessingFormData } from './helpers/createImageProcessingFormData'
import { PATH_API_RESIZE } from '@site/paths'
import { createApiURL, IS_PRODUCTION } from '@site/config'
import { createApiURL } from '@site/config'
import { useImageMutation } from '@api/hooks/useImageMutation'
import type { MutationPayload } from './types'
import type { DownloadableFile } from '@app-types/DownloadableFile'
Expand Down Expand Up @@ -35,9 +35,7 @@ const resizeImage = async (formData: FormData): Promise<Blob> => {
})
return Promise.reject(error)
} catch (err) {
if (!IS_PRODUCTION) {
console.log(err)
}
console.log(err)

throw new FetchException({
cause: err
Expand Down
6 changes: 2 additions & 4 deletions apps/frontend/src/api/update-image-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FetchException } from './exceptions/FetchException'
import { ABORT_TIMEOUT, HTTP_METHOD } from './config'
import { createImageProcessingFormData } from './helpers/createImageProcessingFormData'
import { PATH_API_METADATA } from '@site/paths'
import { createApiURL, IS_PRODUCTION } from '@site/config'
import { createApiURL } from '@site/config'
import { useImageMutation } from '@api/hooks/useImageMutation'
import type { MutationPayload } from './types'
import type { DownloadableFile } from '@app-types/DownloadableFile'
Expand Down Expand Up @@ -35,9 +35,7 @@ const updateImageMetadata = async (formData: FormData): Promise<Blob> => {
})
return Promise.reject(error)
} catch (err) {
if (!IS_PRODUCTION) {
console.log(err)
}
console.log(err)

throw new FetchException({
cause: err
Expand Down

0 comments on commit bb066cb

Please sign in to comment.