jokes-bapak2/client/svelte.config.js

30 lines
868 B
JavaScript
Raw Normal View History

2021-07-09 03:50:38 +00:00
import preprocess from 'svelte-preprocess';
2021-07-09 09:19:10 +00:00
import adapter from '@sveltejs/adapter-static';
2021-07-09 03:50:38 +00:00
import { windi } from 'svelte-windicss-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
2021-07-09 09:19:10 +00:00
preprocess: [windi(), preprocess({ postcss: false })],
2021-07-09 03:50:38 +00:00
kit: {
// hydrate the <div id="svelte"> element in src/app.html
2021-07-09 09:19:10 +00:00
target: '#svelte',
ssr: false,
trailingSlash: 'never',
adapter: adapter({
// default options are shown
pages: 'dist',
assets: 'dist',
fallback: '200.html'
})
2021-07-09 03:50:38 +00:00
}
};
export default config;
// Workaround until SvelteKit uses Vite 2.3.8 (and it's confirmed to fix the Tailwind JIT problem)
const mode = process.env.NODE_ENV;
const dev = mode === 'development';
process.env.TAILWIND_MODE = dev ? 'watch' : 'build';