Does anyone using webpack with babylonjs how do you load babylon file with it

for me i use
var path = require(‘path’)
path.join(‘path’)
i get this errors
when using require(‘path to file’)
Uncaught TypeError: t.substr is not a function

Just add the right imports and then run webpack