How to import "old" ES5 code in ES6 How to import "old" ES5 code in ES6 javascript javascript

How to import "old" ES5 code in ES6


You can use the webpack exports loader:

var riveted = require("exports?riveted!riveted")

See the shiming modules overview for details