Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Build one-file script.js with SvelteKit packaging? [duplicate]

$
0
0

I've built packages using SvelteKit (docs) that I can use in other projects. The build folder typically consists of an index.js that exports a ComponentName.svelte. Then, in another project, I would import it by doing import { ComponentName } from "component-name".

Now I have a use case where I would prefer to import a package using eg. <script src="/path/to/component-name/script.js" />.

Is it possible to use SvelteKit's packaging whereby it builds a single script.js file, instead of a build folder with multiple .js and .svelte files?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>