Hacker News new | past | comments | ask | show | jobs | submit login
Why Webpack? (Or, How Not to Serve JavaScript) (victorzhou.com)
1 point by bibyte on March 8, 2019 | hide | past | favorite | 1 comment



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';




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: