Skip to content

Commit

Permalink
Added option to sveltekit vite project to adjust root
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire authored Nov 19, 2024
1 parent 570562b commit 066aed3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ const warning_preprocessor = {

/**
* Returns the SvelteKit Vite plugins.
* @param {{ root: string }} config
* @returns {Promise<import('vite').Plugin[]>}
*/
export async function sveltekit() {
const svelte_config = await load_config();
export async function sveltekit(config) {
const options = {
cwd: config.root ? config.root : process.cwd();
};
const svelte_config = await load_config(options);

/** @type {import('@sveltejs/vite-plugin-svelte').Options['preprocess']} */
let preprocess = svelte_config.preprocess;
Expand Down

0 comments on commit 066aed3

Please sign in to comment.