Skip to content

Commit

Permalink
build(web): fix adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Sep 16, 2023
1 parent 5788123 commit 0280a3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions apps/playground/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const config = {
// for more information about preprocessors
preprocess: [vitePreprocess()],

// The Svelte Inspector
// Usage: open up your project in the browser. Then use the key combo Command + Shift to activate
vitePlugin: {
inspector: true
},
Expand Down
20 changes: 8 additions & 12 deletions apps/web/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
import adapter from '@sveltejs/adapter-node';
// import preprocess from 'svelte-preprocess';
import adapterNode from '@sveltejs/adapter-node';
import adapterAuto from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';

const isProd = process.env.NODE_ENV === 'production';

/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte'],
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
preprocess: [vitePreprocess()],

// The Svelte Inspector
// Usage: open up your project in the browser. Then use the key combo Command + Shift to activate
vitePlugin: {
inspector: true
},

kit: {
adapter: adapter({
// HINT: need nodejs > v19 runtime
polyfill: false
}),

// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: process.env.VERCEL ? adapterAuto() : adapterNode({ polyfill: false }),
// When hosting SPA on GitHub Pages
paths: {
// base: dev ? '' : '/hc360-ui',
Expand All @@ -38,5 +35,4 @@ const config = {
}
}
};

export default config;
3 changes: 2 additions & 1 deletion docs/vercel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Vercel

![Vercel Monorepo](./images/monorepo.avif "Title")
![Vercel Monorepo](./images/monorepo.avif 'Title')

<p style="text-align: center;">The architecture of a monorepo deployed to Vercel</p>

If your team uses a `trunk-based` development workflow and you want to deploy using `tags` and `releases`,
Expand Down

0 comments on commit 0280a3f

Please sign in to comment.