Added ability to require non-js file types

Webpack provides functionality to require multiple file type. This fix prevents an error being thrown and strips the js file extension.

Signed-off-by: Simon Bailey <simon@newtriks.com>