News for hackers. Stuff that matters.
Re:Why Webpack? (Or, How Not to Serve JavaScript) by hypothete on Friday March 08, 2019 @02:42PM (#19341439)
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';