const path = require('path'); const webpack = require('webpack'); const config = { devtool: 'inline-source-map', mode: 'development', module: { rules: [ { test: /\.js$/, exclude: [ /(node_modules\/(?!@avocado|contempo))/, ], use: { loader: 'babel-loader', }, }, { test: /register-traits.js/, use: { loader: './generate-trait-defs', options: { paths: [ path.resolve(__dirname, 'common'), ], } }, }, ], }, output: { path: path.resolve(__dirname, 'dist'), filename: '[name].js', }, plugins: [ ], resolve: { modules: [path.resolve(__dirname, 'node_modules')], }, resolveLoader: { modules: [path.resolve(__dirname, 'node_modules')], }, }; module.exports = config;