Skip to content

Commit

Permalink
Use unpkg to get latest version in the setup example
Browse files Browse the repository at this point in the history
  • Loading branch information
styd committed Oct 6, 2024
1 parent 63b5834 commit ff8643b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/web-support/rails.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Or, if you use `importmaps', you can:
1. Download to local vendor directory (optional but recommended)

```bash
$ wget -O vendor/javascript/apexcharts.esm.js https://ga.jspm.io/npm:apexcharts@3.54.0/dist/apexcharts.esm.js
$ wget -O vendor/javascript/apexcharts.esm.js https://unpkg.com/apexcharts@latest/dist/apexcharts.esm.js
```

2. Pin "apexcharts" in `config/importmap.rb` to local esm file if you did No. 1:
Expand All @@ -37,7 +37,7 @@ pin "apexcharts", to: "apexcharts.esm.js"
or, to CDN URL directly if you didn't do No. 1:

```ruby
pin "apexcharts", to: "https://ga.jspm.io/npm:apexcharts@3.54.0/dist/apexcharts.esm.js"
pin "apexcharts", to: "https://unpkg.com/apexcharts@latest/dist/apexcharts.esm.js"
```

3. Import and assign to window in `app/javascript/application.js`
Expand Down

0 comments on commit ff8643b

Please sign in to comment.