score:2

Accepted answer

try this in your index.js:

import buttons from "./buttons";
import message from "./message";

export {
  buttons,
  message
}

but i think es6 modules are still experimental in node.js, so it could be that you have to rewrite it to the old module.exports version:

const buttons = require("./buttons"); // and rewrite in buttons.js
const message = require("./message"); // and rewrite in message.js
module.exports = { 
  buttons, 
  message 
};

Related Query

More Query from same tag