0

I'm building a client for a home-grown Node.js like backend and I'd like to support dynamic client-side JavaScript class generation. This can happen before or after Webpack but I'd prefer after (if that's doable).

In the end I'm trying to make something like this work: import {TicTacToeGame} from 'warpdrive-client';

And have TicTacToeGame evaluate to be: class TicTacToeGame { ... }

Except TicTacToeGame is generated by the import call or the global code in warpdrive-client based on supplied configuration or (if it's possible) an argument passed to the module at import time.

Thanks in advance.

  • What do you mean by "generated"? What exactly does need to be dynamic? Please elaborate in more detail. – Bergi Apr 04 '19 at 18:21
  • Related: [Pass options to ES6 module imports](https://stackoverflow.com/q/29923879/1048572) – Bergi Apr 04 '19 at 18:22

0 Answers0