senangwebs-chatbot
Version:
Lightweight JavaScript library that enables easy integration of a customizable chatbot into your website.
37 lines (36 loc) • 737 B
JavaScript
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
entry: {
swc: ['./src/js/swc.js', './src/css/swc.css'],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
library: {
name: 'SWC',
type: 'umd',
},
globalObject: 'this'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, 'css-loader']
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'swc.css'
})
]
};