web
web copied to clipboard
Web dev Server does not work with following import
I use the following import:
import Chart from 'chart.js/auto/auto.js';
the server errors:
(noop plugin) Could not resolve import "chart.js/auto/auto.js" in D:\repos\github\nodeprojects\chart-js-webcomponent\dist\chart\ChartJsWebcomponent.js using exports defined in D:\repos\github\nodeprojects\chart-js-webcomponent\node_modules\chart.js\package.json.
Error while transforming dist\chart\ChartJsWebcomponent.js: Could not resolve import "chart.js/auto/auto.js".
1 | import { BaseCustomWebComponentConstructorAppend, css, html } from "@node-projects/base-custom-webcomponent";
> 2 | import Chart from 'chart.js/auto/auto.js';
|
the package json from chart.js:
https://github.com/chartjs/Chart.js/blob/master/package.json