Skip to content

Commit fd99323

Browse files
committed
Fix Chart.js encore compilation
1 parent 09797ee commit fd99323

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Chartjs/assets/dist/controller.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Controller } from '@hotwired/stimulus';
2-
import Chart from 'chart.js/auto';
2+
import { Chart, registerables } from 'chart.js';
33

4+
Chart.register(...registerables);
45
let isChartInitialized = false;
56
class default_1 extends Controller {
67
constructor() {

src/Chartjs/assets/src/controller.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
'use strict';
1111

1212
import { Controller } from '@hotwired/stimulus';
13-
import Chart from 'chart.js/auto';
13+
import { Chart, registerables } from 'chart.js';
14+
15+
Chart.register(...registerables);
1416

1517
let isChartInitialized = false;
1618

0 commit comments

Comments
 (0)