-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
// stack.config.js
import { defineConfig } from "stack54/config";
export default defineConfig({
// ...
});
Type - string
Your static files that are not to be processed. default = static
Type - string
Your application entry point. default = src/entry.{js,ts,mjs,mts}
Type - Array<string>
Your template files with client assets i.e js,css etc, supports glob pattern. default = src/views/**/*.svelte
Type - boolean
Minify generated Javascript and HTML files
Type - string
Final output directory. default = dist
export default defineConfig({
build: {
outDir: "./custom-output-directory"
}
});
Prefix for generated client assets
export default defineConfig({
build: {
assetPrefix: "https://cdn.example.com"
}
});
Directory to output generated client assets
export default defineConfig({
build: {
assetsDir: "./output-directory"
}
});
Type - string
Environment variables directory
export default defineConfig({
env: {
dir: "./your-env-directory"
}
});
Prefix for environment variables that are allowed in client code. default = PUBLIC_
export default defineConfig({
env: {
publicPrefix: "PUBLIC_"
}
});
Type - Array<Integration>
Custom or third party plugins see
import express from "@stack54/express/plugin";
import { defineConfig } from "stack54/config";
export default defineConfig({
integrations: [express()]
});
Configure the svelte preprocessor. Only a subset of options are supported
- emitCss
- extensions
- preprocess
- compilerOptions
Type - ViteUserConfig
import { defineConfig } from "stack54/config";
export default defineConfig({
vite: { plugins: [vitePlugin()] }
});
configure vite