UNPKG

ecleptic-react-weather-component

Version:
41 lines (38 loc) 916 B
const path = require('path') const CleanWebpackPlugin = require('clean-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const config = require('./package.json') module.exports = { entry: { app: './src/index.js' }, plugins: [ new CleanWebpackPlugin() // new HtmlWebpackPlugin({ // title: 'Production' // }) // new BundleAnalyzerPlugin() ], output: { path: path.resolve(__dirname, 'build'), filename: 'index.js', libraryTarget: 'commonjs2' }, module: { rules: [ { test: /\.js$/, include: path.resolve(__dirname, 'src'), exclude: /(node_modules|bower_components|build)/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env', '@babel/preset-react'] } } } ] }, externals: Object.keys(config.peerDependencies) }