3.0.0 • Published 25 days ago

svelte-adapter-static-digitalocean v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
25 days ago

svelte-adapter-static-digitalocean

Adapter for Svelte apps that extends the official @sveltejs/adapter-static and does the following to support DigitalOcean App Platform out-of-the-box.

The adapter will also look for an App Spec file and adapt the configuration accordingly.

If static_sites is provided in the specifications, the adapter will use the first entry. If you want to use a different one, you will need to provide a name value to the adapter configuration. It will use the value of error_document for the fallback.

If no specification is found or provided, the fallback falls back to 404.html - which is the default for DigitalOcean App Platform.

Configuration

run npm install svelte-adapter-static-digitalocean.

Then add the adapter to your svelte.config.js:

import adapter from 'svelte-adapter-static-digitalocean';

export default {
    kit: {
        ...
        adapter: adapter({
            // default options are shown
            pages: 'build',
            assets: 'build',
            fallback: '404.html',
            precompress: false,
            strict: true,
            spec: '.do/spec.yaml',
            name: ''
        })
    }
};

...and add the prerender option to your root layout (src/routes/+layout.js|ts):

// This can be false if you're using a fallback (i.e. SPA mode)
export const prerender = true;

Please check out the @sveltejs/adapter-static readme for more options.

Issues / Bugs

Please report issues in the here.

3.0.0

25 days ago

2.0.2

8 months ago

1.0.3

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.0-1

2 years ago