UNPKG

brandlabs-bigcommerce-wishlist

Version:

Easy-to-use wishlist functionality for BigCommerce themes.

47 lines (43 loc) 1.04 kB
const path = require('path'); const common = { entry: './index.js', mode: 'production', module: { rules: [ { test: /\.m?js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'], plugins: ['@babel/plugin-transform-runtime'], }, }, }, ], }, }; const exportModule = { library: 'wishlistManager', libraryTarget: 'amd', auxiliaryComment: 'Export Module', }; module.exports = [{ ...common, output: { path: path.resolve(__dirname, 'dist'), filename: 'wishlist-manager.js', ...exportModule, }, optimization: { minimize: false, }, }, { ...common, output: { path: path.resolve(__dirname, 'dist'), filename: 'wishlist-manager.min.js', ...exportModule, }, }];