webpack error — Module build failed: Error: Parse Error without filename

I run­ning web­pack, if I mis­spelled or had any other type of syn­tax error in my javascript files, I was con­tin­u­ally see­ing an error like the following

ModuleBuildError: Module build failed: Error: Parse Error:

To make this worse, it only showed me the line num­ber but not the file.

After check­ing this issue, I decided to switch to using babel-loader instead of jsx loader.

My web­pack con­fig now has the fol­low­ing loader configuration

loaders: [ { jsx: /.js$/, exclude: /node_modules/, loader: 'babel-loader' } ]

Ryan Sukale

Ryan is a UX engineer living in San Francisco, California.

You may also like...