Meta Spartan 0348aa3321
feat: Groq Inference Extension (#2263)
* feat: Groq Inference Extension

* Add Groq supported models

* Fix folder typo

* Add Groq options to interface and new API Key saving, tested working

* Fix linting
2024-03-18 06:40:20 +07:00

40 lines
1023 B
JavaScript

const path = require('path')
const webpack = require('webpack')
const packageJson = require('./package.json')
module.exports = {
experiments: { outputModule: true },
entry: './src/index.ts', // Adjust the entry point to match your project's main file
mode: 'production',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new webpack.DefinePlugin({
MODULE: JSON.stringify(`${packageJson.name}/${packageJson.module}`),
GROQ_DOMAIN: JSON.stringify('api.groq.com'),
}),
],
output: {
filename: 'index.js', // Adjust the output file name as needed
path: path.resolve(__dirname, 'dist'),
library: { type: 'module' }, // Specify ESM output format
},
resolve: {
extensions: ['.ts', '.js'],
fallback: {
path: require.resolve('path-browserify'),
},
},
optimization: {
minimize: false,
},
// Add loaders and other configuration as needed for your project
}