const path = require('path')

module.exports = {
	entry: ['./index.js'],
	output: {
		filename: 'index.js',
		path: path.resolve(__dirname, 'dist'),
		library: 'polymod',
		libraryTarget: 'umd'
	},
	module: {
		rules: [
			{
				test: /\.js$/,
				exclude: [/node_modules/],
				use: [{
					loader: 'babel-loader',
					options: { presets: ['es2015', 'stage-3'] }
				}]
			}
		]
	}
}

const path = require('path')

module.exports = {
	entry: ['./index.js'],
	output: {
		filename: 'index.js',
		path: path.resolve(__dirname, 'dist'),
		library: 'polymod',
		libraryTarget: 'commonjs2'
	},
	module: {
		rules: [
			{
				test: /\.js$/,
				exclude: [/node_modules/],
				use: [{
					loader: 'babel-loader',
					options: { presets: ['es2015', 'stage-3'] }
				}]
			}
		]
	}
}

Update library target