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 ? 'html-documents.app.js' : 'html-documents.app.dev.js', pathinfo: !isProduction, library: isProduction ? 'appHtmlDocument' : undefined, libraryTarget: isProduction ? 'var' : undefined }, externals: {}, // isProduction ? { // Côme - since plugins are imported through