avocado-old/packages/net/packet/packets.avopack.js
2019-11-22 02:13:32 -06:00

24 lines
573 B
JavaScript

const path = require('path');
module.exports = ({entries, paths, root, rules}) => {
rules.push({
test: new RegExp('@avocado/packages/net/packet/packets.avopack.js$'),
use: {
loader: '@avocado/core/webpack/autoreg',
options: {
classTransformer: (Packet) => {
return `${Packet}Packet`;
},
paths,
registrar: {
function: 'registerPacket',
module: '@avocado/net',
},
root,
type: 'packet',
},
},
});
entries.push('@avocado/net/packet/packets.avopack');
};