fixed require external modules in js webpack