So I have a JS file that I want to mix and copy and compress using Laravel mix; my webpack.mix.js file looks like so: The thing is that foo.js has a variable called env, set to dev on local envs, and we set it to app on production. Is there a way I can automate this? For example, can I
Tag: laravel-mix
Moment js undefined Laravel
I’m trying to use moment.js in my laravel project, not using vue, but still importing the package via npm. My app.js file: in my webpack.pix.js file looks like this: And then in my custom.js file I’ve just got this: I’m getting the following error: I’ve verified that moment is in my compiled app.js file. So why can’t my custom.js file