Hacker News new | ask | show | jobs
by hypothete 2661 days ago
A further improvement would be to switch your CommonJS-style imports and exports out for ES6 notation. This allows for more native interoperability, and works fine with Webpack.

  export const Constants = { version: '1.0.0' };

  // in another file
  import { Constants } from './Constants.js';