var path = require("path"); var mode = process.env.NODE_ENV || "development"; module.exports = [ // CJS (Node.JS, React, etc...) { entry: "./src/index.js", mode: mode, output: { path: path.resolve(__dirname, "dist"), filename: "mapp-board-cjs.js", library: "", libraryTarget: "commonjs", }, watch: (mode === "development"), externals: { fabric: 'fabric', }, }, // UMD (Browser) { entry: "./src/index.js", mode: mode, output: { path: path.resolve(__dirname, "dist"), filename: "mapp-board-umd.js", library: "mappBoard", libraryTarget: "umd", }, watch: (mode === "development"), }, ];