UNPKG

senangwebs-buy

Version:

Lightweight JavaScript library that that enables easy implementation of e-commerce functionality through HTML attributes

37 lines (36 loc) 737 B
const path = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = { entry: { swb: ['./src/js/swb.js', './src/css/swb.css'], }, output: { filename: '[name].js', path: path.resolve(__dirname, 'dist'), library: { name: 'SWB', 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: 'swb.css' }) ] };