Open aleritty opened 1 year ago
But it work when just commenting out the neutralino-adapter.
import staticAdapter from '@sveltejs/adapter-static';
import neutralinoAdapter from '@macfja/svelte-adapter-neutralino';
import multiAdapter from '@macfja/svelte-multi-adapter';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: multiAdapter([
staticAdapter({
strict: false,
pages: 'build/static',
assets: 'build/static',
fallback: 'index.html',
precompress: false,
handleHttpError: 'ignore'
// }),
// neutralinoAdapter({
// name: 'ALS-Stift',
// icon: 'static/favicon.png',
// applicationId: 'de.apstresearch.als-stift',
// output: 'build/neutralino',
// window: {
// width: 1024,
// height: 768,
// minWidth: 400,
// minHeight: 200,
// resizable: true,
// maximize: true
// }
})
])
}
};
export default config;
The Neutralino adapter is using the @sveltejs/adapter-static
under the hood. And suppose that your application is fully static (no Server Side rendering and no server action/code)
But it would be easy to add the possibility to pass custom configuration to the @sveltejs/adapter-static
.
Maybe something like that:
neutralinoAdapter({
name: 'APP',
icon: 'static/favicon.png',
applicationId: 'de.APP.com',
output: 'build/neutralino',
window: {
width: 1024,
height: 768,
minWidth: 400,
minHeight: 200,
resizable: true,
maximize: true
},
staticAdapter: {
strict: false,
fallback: 'index.html',
precompress: false
// ...
// but `pages` and `assets` won't be configurable as the Neutralino adapter need to have control on them
}
})
Sorry, maybe I wasn't clear in the description.
My application needs "strict: false" in the staticAdapter. If I use only the static adapter everything builds
If I use staticAdapter + neutralinoAdapter, then the staticAdapter will fail. Please check the copied configurations.
I will prepare also a test repository to replicate the problem
I have a simple sveltekit project where I need to link to resources not handled by sveltekit. Therefore I needed to pass "strict: false" to svelte static adapter. I also wanted to use a second adapter to crate a neutralino's app.
It works when I do it directly, like this:
But it doesn't when I use it inside the multi adapter with neutralino-adapter, like this:
Error message:
These are my package.json dependencies:
I'm not sure what can be the cause.