mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-12-04 08:09:16 +00:00
* chore: publish utils-internal under the @windmill-labs org Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: publish utils-internal on release with trusted publishing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: build the frontend from utils-internal source Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
1.9 KiB
JavaScript
56 lines
1.9 KiB
JavaScript
import preprocess from 'svelte-preprocess'
|
|
import adapter from '@sveltejs/adapter-static'
|
|
import { preprocessMeltUI, sequence } from '@melt-ui/pp'
|
|
import { readFileSync } from 'fs'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const pkg = JSON.parse(
|
|
readFileSync(fileURLToPath(new URL('package.json', import.meta.url)), 'utf8')
|
|
)
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://github.com/sveltejs/svelte-preprocess
|
|
// for more information about preprocessors
|
|
preprocess: sequence([
|
|
preprocess({
|
|
postcss: true
|
|
}),
|
|
preprocessMeltUI()
|
|
]),
|
|
|
|
kit: {
|
|
adapter:
|
|
process.env.CLOUDFLARE || process.env.NOCATCHALL
|
|
? adapter({ pages: 'build', assets: 'build', fallback: 'index.html', precompress: false })
|
|
: adapter({
|
|
// default options are shown
|
|
pages: 'build',
|
|
assets: 'build',
|
|
fallback: '200.html'
|
|
}),
|
|
// Same for every build of one revision (SvelteKit's Date.now() default is not, so
|
|
// the per-architecture images disagreed on content-hashed asset filenames and
|
|
// mixed-arch clusters 404ed on each other's chunks), and different between
|
|
// revisions (SvelteKit only full-page reloads on a missing chunk if this changed).
|
|
version: { name: process.env.WM_BUILD_VERSION || pkg.version },
|
|
prerender: { entries: [] },
|
|
alias: {
|
|
$system_prompts: '../system_prompts/auto-generated',
|
|
$oauth_connect_registry: '../backend/oauth_connect.json',
|
|
// The flow chat runs on the published SDK's source, so the product and the
|
|
// package share one implementation (vite.config.js allows serving it).
|
|
'windmill-chat': '../chat-sdk/src/index.ts',
|
|
// Source shared with the CLI. Import modules, not the index: the index reaches
|
|
// `src/gen`, which is generated and absent from a fresh checkout.
|
|
'windmill-utils-internal': '../cli/windmill-utils-internal/src'
|
|
}
|
|
},
|
|
|
|
vitePlugin: {
|
|
inspector: true
|
|
}
|
|
}
|
|
|
|
export default config
|