mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-09 17:52:14 +00:00
feat: aliases for paths
This commit is contained in:
parent
474caab0e1
commit
02c2953b64
2 changed files with 14 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import adapter from '@sveltejs/adapter-node';
|
import adapter from '@sveltejs/adapter-node';
|
||||||
import preprocess from 'svelte-preprocess';
|
import preprocess from 'svelte-preprocess';
|
||||||
|
import path from "path";
|
||||||
import { windi } from 'svelte-windicss-preprocess';
|
import { windi } from 'svelte-windicss-preprocess';
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
|
|
@ -8,7 +9,11 @@ const config = {
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: [preprocess(), windi({})],
|
preprocess: [preprocess(), windi({})],
|
||||||
kit: {
|
kit: {
|
||||||
adapter: adapter({ out: 'build' })
|
adapter: adapter({ out: 'build' }),
|
||||||
|
alias: {
|
||||||
|
$i18n: path.resolve('./src/translations'),
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,13 @@
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": true
|
"strict": true,
|
||||||
|
"paths": {
|
||||||
|
"$lib": ["src/lib"],
|
||||||
|
"$lib/*": ["src/lib/*"],
|
||||||
|
"$i18n": ["src/translations"],
|
||||||
|
"$i18n/*": ["src/translations/*"],
|
||||||
|
"$params": ["src/params"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue