Working on a small app that will have to be ran on any browser. When I run mix.babel on my js file and then try to load the page, it complains that "Uncaught ReferenceError: require is not defined". This is due to the ./bootstrap js file that has multiple require calls. Any suggestions?
Hmm, I would get rid of babel for now and use js...that will accomplish the same thing. You should not have a require method in your js after processing. The browser does not understand require() because it is a node function. So, that tells me that the file is not being processed correctly even though its throwing no errors or warnings (sometimes you need to scroll up to see warnings). I would try that way first and if still the issue, start looking at how you are using require in your code.
I was trying to write in ES2015 but compile it so that older browsers could still render it. Writing an app where people might be using IE7 and have to support it. :(
Yikes, well the mix.js method will do the same thing because it uses babel anyhow. I would see if it works for you. If you need to adjust the config for older browsers then you can modify the webpack.mix.js file with the new code. The docs explain how to do it so that your config code is merged in.