ctf0
6
2
Mix

how to combin webpack with scripts at the same time

Posted 2 years ago by ctf0

currently i have

elixir(mix => {
  mix
        .webpack('app.js', 'public/assets/js/app-min.js')
        .webpack('extra.js', 'public/assets/js/extra-min.js')
    }
);

but what i want is to have only one file instead of 2 , so i tried

elixir(mix => {
  mix
        .webpack('app.js')
        .webpack('extra.js')
        .scripts(['app.js', 'extra.js'], 'public/assets/js/app-min.js');
    }
);

but now i get 3 files :(.

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.