@sveltejs/adapter-node
Advanced tools
Comparing version 1.0.0-next.8 to 1.0.0-next.9
# @sveltejs/adapter-node | ||
## 1.0.0-next.9 | ||
### Patch Changes | ||
- 8805c6d: Pass adapters directly to svelte.config.cjs | ||
## 1.0.0-next.8 | ||
@@ -4,0 +10,0 @@ |
15
index.js
@@ -1,4 +0,3 @@ | ||
import { copyFileSync } from 'fs'; | ||
import { dirname, join } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
const { copyFileSync } = require('fs'); | ||
const { join } = require('path'); | ||
@@ -10,8 +9,8 @@ /** | ||
*/ | ||
export default function ({ out = 'build' } = {}) { | ||
module.exports = function ({ out = 'build' } = {}) { | ||
/** @type {import('@sveltejs/kit').Adapter} */ | ||
const adapter = { | ||
name: '@sveltejs/adapter-node', | ||
async adapt(builder) { | ||
const dir = dirname(fileURLToPath(import.meta.url)); | ||
builder.log.minor('Copying assets'); | ||
@@ -25,3 +24,3 @@ const static_directory = join(out, 'assets'); | ||
copyFileSync(`${dir}/files/server.js`, `${out}/index.js`); | ||
copyFileSync(`${__dirname}/files/server.js`, `${out}/index.js`); | ||
@@ -36,2 +35,2 @@ builder.log.minor('Prerendering static pages'); | ||
return adapter; | ||
} | ||
}; |
{ | ||
"name": "@sveltejs/adapter-node", | ||
"version": "1.0.0-next.8", | ||
"version": "1.0.0-next.9", | ||
"main": "index.js", | ||
"type": "module", | ||
"files": [ | ||
@@ -20,3 +19,3 @@ "files" | ||
"@sveltejs/app-utils": "1.0.0-next.3", | ||
"@sveltejs/kit": "1.0.0-next.50", | ||
"@sveltejs/kit": "1.0.0-next.54", | ||
"compression": "^1.7.4", | ||
@@ -23,0 +22,0 @@ "polka": "^0.5.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
492203
13811
No