Merge pull request #10770 from Budibase/fix/ioredis-build-issue
Ioredis-mock bundling issue
This commit is contained in:
commit
cd294ce726
1 changed files with 6 additions and 2 deletions
|
@ -3,8 +3,12 @@ import Redis from "ioredis"
|
||||||
// mock-redis doesn't have any typing
|
// mock-redis doesn't have any typing
|
||||||
let MockRedis: any | undefined
|
let MockRedis: any | undefined
|
||||||
if (env.MOCK_REDIS) {
|
if (env.MOCK_REDIS) {
|
||||||
|
try {
|
||||||
// ioredis mock is all in memory
|
// ioredis mock is all in memory
|
||||||
MockRedis = require("ioredis-mock")
|
MockRedis = require("ioredis-mock")
|
||||||
|
} catch (err) {
|
||||||
|
console.log("Mock redis unavailable")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
import {
|
import {
|
||||||
addDbPrefix,
|
addDbPrefix,
|
||||||
|
|
Loading…
Reference in a new issue