feat: dialect support for mux

Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
mertmit
2024-04-18 16:23:37 +03:00
parent 0246a3dba4
commit 7115dcb649
10 changed files with 398 additions and 163 deletions

View File

@@ -0,0 +1,47 @@
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const { resolveTsAliases } = require('../nocodb/build-utils/resolveTsAliases');
module.exports = {
entry: './src/index.ts',
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: {
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
},
],
},
optimization: {
nodeEnv: false,
},
externals: [
nodeExternals({
allowlist: ['knex-snowflake', 'knex-databricks'],
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: resolveTsAliases(path.resolve('./tsconfig.json')),
},
mode: 'production',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
library: 'libs',
libraryTarget: 'umd',
globalObject: "typeof self !== 'undefined' ? self : this",
},
node: {
__dirname: false,
},
plugins: [],
target: 'node',
};