0

I'm using Laravel Elixir and trying to dump Webpack output to a custom-named file. My Gulpfile has the following lines:

mix.webpack(
    './assets/js',
    'dist/assets/js/custom.js'
);

Surprisingly, this creates an extra folder in my dist folder:

dist/assets/js/custom.js/custom.js

Alternatively, I tried this just to see what happens:

mix.webpack(
    './assets/js',
    'dist/assets/js'
);

The result is like:

dist/assets/js/b40893aeee1432abcd.js

What is going wrong here? I just want dist/assets/js/custom.js

1
  • You have the wrong "elixir" tag. I will retag the question. Commented Jan 6, 2017 at 2:21

1 Answer 1

1

The second parameter is the path of your output file. It will be

mix.webpack('./assets/js','public/dist/assets/js/custom.js');
Sign up to request clarification or add additional context in comments.

2 Comments

Right. As I said, that's not working. It's creating an extra subfolder.
Specify your source file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.