web icon indicating copy to clipboard operation
web copied to clipboard

Web dev Server does not work with following import

Open jogibear9988 opened this issue 2 years ago • 0 comments

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

jogibear9988 avatar Nov 28 '23 20:11 jogibear9988