1ff-chat-ui
Version:
chatbot to communicate with taught ai
37 lines (35 loc) • 862 B
JavaScript
const path = require('path');
const webpack = require('webpack');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const Terser = require('terser-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
library: 'ChatbotConnect',
libraryTarget: 'umd',
libraryExport: 'default',
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
],
},
plugins: [
new Terser(),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, 'index.html'),
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
// Add other core modules as needed
}),
],
};