24 lines
573 B
JavaScript
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');
|
|
};
|