When I import using import { Chart, Axis, ... } form 'layerchart' I'm seeing many additional packages make their way into the build files.
repro: https://stackblitz.com/edit/sveltejs-kit-template-default-skoueh8c?file=.svelte-kit%2Foutput%2Fserver%2Fentries%2Fpages%2F_page.svelte.js
E.g. For my SvelteKit project, when I run npm run build for an app with the following page, you can see the additional imports included in the build results, which I've included the imports for below.
<!-- +page.svelte -->
<script>import'../app.css'import { scaleBand, scaleOrdinal, scaleTime } from'd3-scale';import { Chart, Layer, Axis, Bars } from'layerchart'import { data } from'./data'</script>
<divclass="h-[300px] p-4 border rounded-sm">
<Chart
{data}
x="date"xScale={scaleBand().padding(0.4)}
y="value"yDomain={[0, null]}
yNice={4}
padding={{ left: 16, bottom: 24 }}
>
<Layertype="svg">
<Axisplacement="left"gridrule />
<Axisplacement="bottom"rule />
<BarsstrokeWidth={1} class="fill-primary" />
</Layer>
</Chart>
</div>// Top of build file: .svelte-kit/output/server/entries/pages/_page.svelte.jsimport"clsx";import{iasis_array,kasget_prototype_of,oasobject_prototype,nasnoop,lasdeferred,mashasContext,gasgetContext,sassetContext,paspush,qasspread_attributes,tasclsx,uasbind_props,faspop,vasattr_class,hasescape_html,wasattr,xasstringify,yasprops_id,zasattr_style,Aasspread_props,Bascopy_payload,Easassign_payload,Fasensure_array_like}from"../../chunks/index.js";import{scaleLinear,scaleSqrt,scaleOrdinal,scaleBand}from"d3-scale";import{Logger,format,localPoint,sortFunc,unique,isLiteralObject,Duration,DateToken,PeriodType,greatestAbs}from"@layerstack/utils";import{cls}from"@layerstack/tailwind";import{get}from"lodash-es";import{rgb}from"d3-color";importmemoizefrom"memoize";import{InternSet,max,min,bisector,extent}from"d3-array";import{tasstate,uasrender_effect,nasset,oasget$1}from"../../chunks/runtime.js";import{quadtree}from"d3-quadtree";import{curveLinearClosed,lineRadial,line,pointRadial,arc}from"d3-shape";import{interpolatePath}from"d3-interpolate-path";import{objectId}from"@layerstack/utils/object";import{Delaunay}from"d3-delaunay";import{geoVoronoi}from"d3-geo-voronoi";import{geoPath,geoTransform}from"d3-geo";import{path}from"d3-path";import{timeTicks,timeYear,timeDay,timeHour,timeMinute,timeSecond,timeMillisecond}from"d3-time";import"@dagrejs/dagre";import"d3-tile";import"d3-sankey";System details:
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 20.19.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
d3-scale: ^4.0.2 => 4.0.2 layerchart: ^2.0.0-next.27 => 2.0.0-next.33 svelte: ^5.25.0 => 5.36.13
When I import using
import { Chart, Axis, ... } form 'layerchart'I'm seeing many additional packages make their way into the build files.repro: https://stackblitz.com/edit/sveltejs-kit-template-default-skoueh8c?file=.svelte-kit%2Foutput%2Fserver%2Fentries%2Fpages%2F_page.svelte.js
E.g. For my SvelteKit project, when I run
npm run buildfor an app with the following page, you can see the additional imports included in the build results, which I've included the imports for below.System details: