Before the script runs, each import x from 'path' becomes var x = require('path'). This is a textual rewrite, so it accepts the common shapes and not the full ES6 ...