Hello Ghiura Alexandru!
could you please support vite with vue ts - because thats the recommended way to start a vue3 project now.
It works fine with development server (npm run dev) but can't build it:
If you make a brand new vite vue ts project like so:
ralph@centauri:~/testspace$ npm create vite@latest my-vue-app --template vue
Need to install the following packages:
create-vite@latest
Ok to proceed? (y) y
โ Select a framework: โบ vue
โ Select a variant: โบ vue-ts
Scaffolding project in /home/ralph/testspace/my-vue-app...
Done. Now run:
cd my-vue-app
npm install
npm run dev
And then add your example "Linechart.vue" from your website, plug it in the Helloworld.vue and compile it like this:
ralph@centauri:~/testspace/my-vue-app$ npm run build
[email protected] build
vue-tsc --noEmit && vite build
node_modules/vue3-charts/dist/components/Chart/index.vue.d.ts:1:71 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { ChartAxis, ChartConfig, Data, Direction, Margin, Size } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/components/Layer/index.vue.d.ts:1:27 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { LayerType } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/components/Line/index.vue.d.ts:1:23 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { Point } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/components/Treemap/index.vue.d.ts:1:30 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
1 import { Margin, Size } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/hooks/useBars.d.ts:2:27 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
2 import { Rectangle } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/hooks/useChart.d.ts:1:23 - error TS2307: Cannot find module '@/models' or its corresponding type declarations.
1 import { Chart } from '@/models';
~~~~~~~~~~
node_modules/vue3-charts/dist/hooks/usePoints.d.ts:2:23 - error TS2307: Cannot find module '@/types' or its corresponding type declarations.
2 import { Point } from '@/types';
~~~~~~~~~
node_modules/vue3-charts/dist/types/index.d.ts:1:27 - error TS7016: Could not find a declaration file for module 'd3-axis'. '/home/ralph/testspace/my-vue-app/node_modules/d3-axis/src/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/d3-axis
if it exists or add a new declaration (.d.ts) file containing declare module 'd3-axis';
1 import type { Axis } from 'd3-axis';
~~~~~~~~~
node_modules/vue3-charts/dist/types/index.d.ts:2:29 - error TS7016: Could not find a declaration file for module 'd3-shape'. '/home/ralph/testspace/my-vue-app/node_modules/d3-shape/src/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/d3-shape
if it exists or add a new declaration (.d.ts) file containing declare module 'd3-shape';
2 import { PieArcDatum } from 'd3-shape';
~~~~~~~~~~
Found 9 errors in 8 files.
Errors Files
1 node_modules/vue3-charts/dist/components/Chart/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/components/Layer/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/components/Line/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/components/Treemap/index.vue.d.ts:1
1 node_modules/vue3-charts/dist/hooks/useBars.d.ts:2
1 node_modules/vue3-charts/dist/hooks/useChart.d.ts:1
1 node_modules/vue3-charts/dist/hooks/usePoints.d.ts:2
2 node_modules/vue3-charts/dist/types/index.d.ts:1