Hasil mix, kode javascript tidak berfungsi

Saat saya melakukan MIX (penggabungan) package javascript ke satu file. Semua kode JavaScript tidak dapat berjalan.

kode dibawah ini yg ada difile mix.js

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

mix.styles([
    'public/css/app.css',
    'node_modules/chartjs/dist/Chart.css',
    'node_modules/cropper/dist/cropper.css',
    // 'node_modules/bootstrap/dist/css/bootstrap.css',
    'node_modules/@fortawesome/fontawesome-free/css/all.css',
], 'public/css/combine.min.css').version();

mix.scripts([
    'public/js/app.js',
    'node_modules/anime/lib/anime.js',
    // 'node_modules/bootstrap/dist/js/bootstrap.js',
    'node_modules/chartjs/dist/Chart.bundle.js',
    'node_modules/chartjs/dist/Chart.js',
    'node_modules/cropper/dist/cropper.js',
    'node_modules/fine-uploader/lib/all.js',
    'node_modules/@fortawesome/fontawesome-free/js/all.js',
    'node_modules/jquery/dist/jquery.js',
    'node_modules/popper.js/dist/popper.js'
], 'public/js/all.js').version();

Code dibawah ini pemanggilan file hasil MIX:

<script src="{{ asset('js/combine.js') }}"></script>
    {{-- <script src="{{ asset('js/chart.js') }}"></script> --}}
    {{-- @yield('script') --}}
</body>
</html>

Jika file yang akan di MIX terlalu banyak, Apakah akan menyebabkan script menjadi bentrok?

avatar Chata
@Chata

118 Kontribusi 19 Poin

Diperbarui 4 tahun yang lalu

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban