v1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import staticAdapter from '@sveltejs/adapter-static';
|
||||
|
||||
async function resolveAdapter() {
|
||||
try {
|
||||
const { default: nodeAdapter } = await import('@sveltejs/adapter-node');
|
||||
return nodeAdapter({
|
||||
out: 'build',
|
||||
precompress: true,
|
||||
});
|
||||
} catch {
|
||||
return staticAdapter({
|
||||
pages: 'build',
|
||||
assets: 'build',
|
||||
fallback: 'index.html',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
kit: {
|
||||
adapter: await resolveAdapter(),
|
||||
files: {
|
||||
assets: 'public',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user