diff --git a/api/get-market-data.js b/api/get-market-data.js index c538fb679..e2f01a81e 100644 --- a/api/get-market-data.js +++ b/api/get-market-data.js @@ -1,18 +1,18 @@ // Dependencies required by ./utils (see below) need to be explicitly required // here to ensure that that they are included in serverless builds. Do NOT // remove them unless they are not needed by any upstream modules. -import { promisify } from 'util' +const { promisify } = require('util') -import 'redis' -import '../src/common/utils' +require('redis') +require('../src/common/utils') // End explicit requires for serverless builds -import { +const { allowCors, getRedisClient, getRoomData, getRoomName, -} from '../api-etc/utils' +} = require('../api-etc/utils') const client = getRedisClient() diff --git a/api/post-day-results.js b/api/post-day-results.js index d781d3c31..e26e9fd42 100644 --- a/api/post-day-results.js +++ b/api/post-day-results.js @@ -1,21 +1,21 @@ // Dependencies required by ./utils (see below) need to be explicitly required // here to ensure that that they are included in serverless builds. Do NOT // remove them unless they are not needed by any upstream modules. -import 'redis' -import '../src/common/utils' -import '../src/common/constants' -import '../api-etc/constants' +require('redis') +require('../src/common/utils') +require('../src/common/constants') +require('../api-etc/constants') // End explicit requires for serverless builds -import { promisify } from 'util' +const { promisify } = require('util') -import { +const { allowCors, getRedisClient, getRoomData, getRoomName, -} from '../api-etc/utils' -import { random } from '../src/common/utils' +} = require('../api-etc/utils') +const { random } = require('../src/common/utils') const client = getRedisClient() diff --git a/api/publish-global-market-values-to-discord.js b/api/publish-global-market-values-to-discord.js index b32ff0795..119caa118 100644 --- a/api/publish-global-market-values-to-discord.js +++ b/api/publish-global-market-values-to-discord.js @@ -1,18 +1,18 @@ // Dependencies required by ./utils (see below) need to be explicitly required // here to ensure that that they are included in serverless builds. Do NOT // remove them unless they are not needed by any upstream modules. -import 'redis' -import '../src/common/utils' -import '../src/common/constants' -import '../api-etc/constants' +require('redis') +require('../src/common/utils') +require('../src/common/constants') +require('../api-etc/constants') // End explicit requires for serverless builds -import { promisify } from 'util' +const { promisify } = require('util') -import axios from 'axios' +const axios = require('axios') -import { MARKET_SUMMARY_FOR_DISCORD } from '../api-etc/templates' -import { allowCors, getRedisClient, getRoomData } from '../api-etc/utils' +const { MARKET_SUMMARY_FOR_DISCORD } = require('../api-etc/templates') +const { allowCors, getRedisClient, getRoomData } = require('../api-etc/utils') const client = getRedisClient()