Created
January 24, 2024 16:54
-
-
Save ZachSaucier/30ff2764a1b2aacfb244ccc2dc6e77d5 to your computer and use it in GitHub Desktop.
Revisions
-
ZachSaucier created this gist
Jan 24, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ // apps/website-1/svelte.config.js import { createSvelteConfig } from 'config/svelte.js' import adapter from '@sveltejs/adapter-cloudflare' export default createSvelteConfig({ adapter: adapter(), alias: { $sections: 'src/sections', }, }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ // packages/config/svelte.js import { resolve, join } from 'path' import { fileURLToPath } from 'url' import preprocess from 'svelte-preprocess' const stylesPath = `${resolve(fileURLToPath(import.meta.url), '../../../packages/styles')}` export const scssImports = `@use "${join(stylesPath, 'imports.scss')}" as *;` /** @type {import('@sveltejs/kit').Config} */ export const createSvelteConfig = ({ adapter, kit, alias, ...rest }) => { return { // Preprocessors docs: https://github.com/sveltejs/svelte-preprocess preprocess: preprocess({ scss: { prependData: scssImports, } }), kit: { adapter, alias: { $components: 'src/components', $animations: 'src/animations', $utils: 'src/utils', $styles: 'src/styles', ...alias, }, prerender: { handleMissingId: 'ignore', }, inlineStyleThreshold: 4096, ...kit, }, ...rest, } }