JeffreyWay / laravel-elixir-webpack-official

88 stars 28 forks source link

Custom output filename issue #50

Open exequeryphil opened 7 years ago

exequeryphil commented 7 years ago

I'm 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

ghost commented 7 years ago

I think you might be missing a period "." like so:

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