feather/webpack.config.js
Cole Bemis c978b1cb4e fix: Remove unused polyfills and update build config
Removes polyfills for `Object.assign` and `Set` which, as far as I can tell, are unused in the
codebase. Updates `webpack` from 3 to 4. Replaces `babel-preset-es2015` with `babel-preset-env`.
Reduces the minified bundle size (`feather.min.js`) by **9.3kB** (72.4kB to 63.1kB). Does not change
any functionality of the library.
2018-05-18 12:26:21 -07:00

21 lines
407 B
JavaScript

const path = require('path');
module.exports = {
entry: ['core-js/fn/array/from', path.resolve(__dirname, 'src/index.js')],
output: {
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
library: 'feather',
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
};