const webpack = require('webpack') const path = require('path') const isProduction = process.env.NODE_ENV === 'production' console.log('isProduction : ', isProduction) module.exports = { entry: isProduction ? './src/index.js' // only one instance of babel-polyfill is allowed : ['babel-polyfill', './src/index.dev.js'], output: { path: path.resolve(__dirname, 'dist'), filename: isProduction ? 'admin_workspace_user.app.js' : 'admin_workspace_user.app.dev.js', pathinfo: !isProduction, library: isProduction ? 'appAdminWorkspaceUser' : undefined, libraryTarget: isProduction ? 'var' : undefined }, externals: {}, // isProduction ? { // Côme - since plugins are imported through