Javascript File Concatenation
Ross Henderson

Ross Henderson @scottishross

About: Oracle, APEX, .Net, Xamarin.Forms, Flutter, Scrum Master, Musician, Dog Lover https://www.littlevictories.app/

Location:
UK
Joined:
Nov 11, 2017

Javascript File Concatenation

Publish Date: Jul 10 '19
4 3

Hey guys,

I'm wanting to use SweetAlert2 in one of my applications but I'm having a problem with the JS files. The developers for SweetAlert2 have several JS files that seem to group relevant JS together. But I'm using Oracle APEX, and it doesn't quite allow the JS files to reference each other as they do (because they assume they're in the same directory).

Can anyone give me pointers on how to concatenate these files or if there's an easier way to do it? It'll have to be one file at the end.

Comments 3 total

  • Robin Kretzschmar
    Robin KretzschmarJul 10, 2019

    Just took a quick look at it and the Readme has a line to include a minified version:
    SweetAlert2 Repo

    The important part is the URL of the CDN file:

    Installation

    ...

    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
    

    ...

    <script src="sweetalert2/dist/sweetalert2.all.min.js"></script>
    

    ...

    <script src="sweetalert2/dist/sweetalert2.min.js"></script>
    <link rel="stylesheet" href="sweetalert2/dist/sweetalert2.min.css">
    

    So you can download the file from there and have your combined file locally without any effort.

Add comment