julien-c HF staff commited on
Commit
5fcb9b2
1 Parent(s): 057eeba

install adapter-static and configure

Browse files

npm i -D @sveltejs/adapter-static@next

Files changed (2) hide show
  1. package.json +2 -1
  2. svelte.config.js +7 -1
package.json CHANGED
@@ -13,6 +13,7 @@
13
  },
14
  "devDependencies": {
15
  "@sveltejs/adapter-auto": "next",
 
16
  "@sveltejs/kit": "next",
17
  "@types/cookie": "^0.4.1",
18
  "@typescript-eslint/eslint-plugin": "^4.31.1",
@@ -34,4 +35,4 @@
34
  "@lukeed/uuid": "^2.0.0",
35
  "cookie": "^0.4.1"
36
  }
37
- }
 
13
  },
14
  "devDependencies": {
15
  "@sveltejs/adapter-auto": "next",
16
+ "@sveltejs/adapter-static": "^1.0.0-next.24",
17
  "@sveltejs/kit": "next",
18
  "@types/cookie": "^0.4.1",
19
  "@typescript-eslint/eslint-plugin": "^4.31.1",
 
35
  "@lukeed/uuid": "^2.0.0",
36
  "cookie": "^0.4.1"
37
  }
38
+ }
svelte.config.js CHANGED
@@ -1,6 +1,9 @@
1
- import adapter from '@sveltejs/adapter-auto';
2
  import preprocess from 'svelte-preprocess';
3
 
 
 
 
4
  /** @type {import('@sveltejs/kit').Config} */
5
  const config = {
6
  // Consult https://github.com/sveltejs/svelte-preprocess
@@ -8,6 +11,9 @@ const config = {
8
  preprocess: preprocess(),
9
 
10
  kit: {
 
 
 
11
  adapter: adapter(),
12
 
13
  // hydrate the <div id="svelte"> element in src/app.html
 
1
+ import adapter from '@sveltejs/adapter-static';
2
  import preprocess from 'svelte-preprocess';
3
 
4
+ const dev = process.env.NODE_ENV === 'development';
5
+
6
+
7
  /** @type {import('@sveltejs/kit').Config} */
8
  const config = {
9
  // Consult https://github.com/sveltejs/svelte-preprocess
 
11
  preprocess: preprocess(),
12
 
13
  kit: {
14
+ paths: {
15
+ base: dev ? '' : '/staticspaceiframe/julien-c/sveltekit-demo/build',
16
+ },
17
  adapter: adapter(),
18
 
19
  // hydrate the <div id="svelte"> element in src/app.html