{"repo":"EMH333/esbuild-svelte","free":true,"listed":false,"github":"https://github.com/EMH333/esbuild-svelte","clone":"git clone https://github.com/EMH333/esbuild-svelte.git","description":"An esbuild plugin to compile Svelte components","language":"JavaScript","stars":264,"topics":["esbuild","svelte","plugin","javascript"],"license":"MIT","category":"ui-components","readme_excerpt":"esbuild-svelte Plugin to compile svelte components for bundling with esbuild. Install Install this plugin, esbuild and Svelte. A simple build script looks like The example-js folder of this repository is a great starting off point for a \"complete\" project. You can quickly get started using degit: CSS Output By default, esbuild-svelte emits external css files from Svelte for esbuild to process. If this isn't desired, use a configuration that turns off external css output and instead includes it in the javascript output. For example: sveltePlugin({compilerOptions: {css: \"injected\"}}) Typescript and Other Svelte Preprocessing In order to support Typescript and other languages that require preprocessing before being fed into the Svelte compiler, simply add the preprocessor to the preprocess option (which accepts both a single preprocessor or an array of them). The example script below is a great place to start, you can also look at the example-ts folder for a more complete project. Typescript in .svelte.ts files is supported natively. svelte exports condition If you are importing a svelte component library, you need to add \"svelte\" to conditions in esbuild build options. This lets esbuild use the svelte property in svelte component's exports conditions in package.json . Advanced For incremental or watch build modes, esbuild-svelte will automatically cache files if they haven't changed. This allows esbuild to skip the Svelte compiler for those files altogether, saving time. Settin","default_branch":null,"files":null,"tree":[],"storefront":"/r/EMH333","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/EMH333/esbuild-svelte/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}