2019-03-20 15:28:18 -05:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
const webpack = require('webpack');
|
|
|
|
|
|
|
|
const config = {
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
mode: 'development',
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: [
|
2019-04-12 11:04:59 -05:00
|
|
|
/(node_modules\/(?!@avocado|contempo))/,
|
2019-03-20 15:28:18 -05:00
|
|
|
],
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2019-04-14 21:06:58 -05:00
|
|
|
test: /register-traits\.js/,
|
2019-04-14 20:39:27 -05:00
|
|
|
use: {
|
2019-04-14 21:06:58 -05:00
|
|
|
loader: './defgen',
|
2019-04-14 20:39:27 -05:00
|
|
|
options: {
|
|
|
|
paths: [
|
|
|
|
path.resolve(__dirname, 'common'),
|
|
|
|
],
|
2019-04-14 21:06:58 -05:00
|
|
|
registrar: {
|
|
|
|
function: 'registerTrait',
|
|
|
|
module: '@avocado/entity/trait-registry',
|
|
|
|
},
|
|
|
|
type: 'trait',
|
|
|
|
},
|
2019-04-14 20:39:27 -05:00
|
|
|
},
|
2019-03-20 15:28:18 -05:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
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;
|