From 909dc03640a323b3f06e456accaa914bc68dc317 Mon Sep 17 00:00:00 2001 From: Manish Kumar Date: Thu, 10 Mar 2022 07:10:22 +0530 Subject: [PATCH] Fixing the dialect import issue for esbuild --- src/sqlstring.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sqlstring.js b/src/sqlstring.js index 1a3e8df..e8a1d1a 100644 --- a/src/sqlstring.js +++ b/src/sqlstring.js @@ -1,7 +1,7 @@ const knexClientFactory = require('knex'); function format(sql, bindings, dialect) { - const knexClient = knexClientFactory({ client: dialect }); + const knexClient = knexClientFactory({ client: require(`knex/lib/dialects/${dialect}`) }); const stringBindings = bindings ? bindings.map((binding) => {