Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use node adapter #2114

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/experiments-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Running svelte-check
run: npm run ex:check

- name: Building static version
run: npm run ex:build:static
- name: Building app
run: npm run ex:build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
GA_TRACKING_ID: "G-PPE5XD2VKV"
Expand Down
127 changes: 25 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"build": "echo RUN explicit build commands",
"ex:check": "npm run ex:sync && npm run check --w @hnn/experiments",
"ex:build": "npm run build --w @hnn/experiments",
"ex:build:static": "npm run build:static --w @hnn/experiments",
"ex:dev": "npm run dev --w @hnn/experiments",
"ex:preview": "npm run preview --w @hnn/experiments",
"ex:start": "npm run start --w @hnn/experiments",
Expand Down
5 changes: 1 addition & 4 deletions packages/experiments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"scripts": {
"dev": "vite dev --host",
"build": "vite build",
"build:static": "BUILD_MODE=static vite build",
"preview": "vite preview",
"preview:static": "BUILD_MODE=static vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json --ignore .svelte-kit,build,tests --threshold warning --diagnostic-sources \"js,ts,svelte\"",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"tsc": "tsc -b",
Expand All @@ -29,8 +27,7 @@
"throttle-debounce": "5.0.0"
},
"devDependencies": {
"@sveltejs/adapter-cloudflare": "4.1.0",
"@sveltejs/adapter-static": "3.0.1",
"@sveltejs/adapter-node": "4.0.1",
"@sveltejs/kit": "2.5.0",
"@tailwindcss/forms": "0.5.7",
"@sveltejs/vite-plugin-svelte": "3.0.2",
Expand Down
17 changes: 3 additions & 14 deletions packages/experiments/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import staticAdapter from '@sveltejs/adapter-static'
import cfAdapter from '@sveltejs/adapter-cloudflare'
import adapter from '@sveltejs/adapter-node'
import preprocess from 'svelte-preprocess'

const staticMode = process.env.BUILD_MODE == 'static'
const isDev = process.env.NODE_ENV == 'dev'

console.log(
'Adapter: ',
staticMode ? 'static' : 'cloudflare',
'build mode; csp enabled',
isDev,
)
console.log('Adapter: node', 'build mode; csp enabled', isDev)

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand All @@ -28,11 +21,7 @@ const config = {
server: './hooks/server.hooks.ts',
},
},
adapter: staticMode
? staticAdapter({
fallback: 'index.html',
})
: cfAdapter(),
adapter: adapter(),
},
}

Expand Down
1 change: 0 additions & 1 deletion packages/web-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
},
"devDependencies": {
"@flydotio/dockerfile": "0.5.2",
"@sveltejs/adapter-cloudflare": "4.1.0",
"@sveltejs/adapter-node": "4.0.1",
"@sveltejs/adapter-static": "3.0.1",
"@sveltejs/kit": "2.5.0",
Expand Down
1 change: 0 additions & 1 deletion packages/web-client/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import staticAdapter from '@sveltejs/adapter-static'
// import cfAdapter from '@sveltejs/adapter-cloudflare'
import preprocess from 'svelte-preprocess'
import nodeAdapter from '@sveltejs/adapter-node'
// import cspDirectives from './directives.js'
Expand Down
Loading