Skip to content

Commit

Permalink
Use import in readme [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Apr 25, 2021
1 parent 307cbe8 commit 07f04ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ yarn add chartkick chart.js
And in `app/javascript/packs/application.js`, add:

```js
require("chartkick/chart.js")
import "chartkick/chart.js"
```

For Rails 5 / Sprockets, in `app/assets/javascripts/application.js`, add:
Expand Down Expand Up @@ -430,7 +430,7 @@ yarn add chartkick chart.js
And in `app/javascript/packs/application.js`, add:

```js
require("chartkick/chart.js")
import "chartkick/chart.js"
```

For Rails 5 / Sprockets, in `app/assets/javascripts/application.js`, add:
Expand All @@ -457,7 +457,7 @@ yarn add chartkick
And in `app/javascript/packs/application.js`, add:

```js
require("chartkick")
import "chartkick"
```

For Rails 5 / Sprockets, in `app/assets/javascripts/application.js`, add:
Expand Down Expand Up @@ -485,7 +485,7 @@ yarn add chartkick highcharts
And in `app/javascript/packs/application.js`, add:

```js
require("chartkick/highcharts")
import "chartkick/highcharts"
```

For Rails 5 / Sprockets, download [highcharts.js](https://code.highcharts.com/highcharts.js) into `vendor/assets/javascripts` (or use `yarn add highcharts` in Rails 5.1+), and in `app/assets/javascripts/application.js`, add:
Expand Down

1 comment on commit 07f04ee

@Yoshihisa19920807
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I import chartkick and chart.js instead of require, f.rich_text_area doesn't work properly.
There's no problem with require.
I really don't know why it happens but just in case anyone encounters the same issue.

Please sign in to comment.