@sveltejs/adapter-netlify
Advanced tools
Comparing version 1.0.0-next.24 to 1.0.0-next.25
# @sveltejs/adapter-netlify | ||
## 1.0.0-next.25 | ||
### Patch Changes | ||
- e9f78999: fix: include esbuild config in adapter type definition | ||
## 1.0.0-next.24 | ||
@@ -4,0 +10,0 @@ |
@@ -1,3 +0,6 @@ | ||
declare function plugin(): import('@sveltejs/kit').Adapter; | ||
type BuildOptions = import('esbuild').BuildOptions; | ||
declare function plugin(options?: { | ||
esbuild?: (defaultOptions: BuildOptions) => Promise<BuildOptions> | BuildOptions; | ||
}): import('@sveltejs/kit').Adapter; | ||
export = plugin; |
12
index.js
@@ -14,5 +14,5 @@ import { appendFileSync, existsSync, readFileSync, writeFileSync } from 'fs'; | ||
* esbuild?: (defaultOptions: BuildOptions) => Promise<BuildOptions> | BuildOptions; | ||
* }} options | ||
* }} [options] | ||
**/ | ||
export default function (options = { esbuild: (opts) => opts }) { | ||
export default function (options) { | ||
/** @type {import('@sveltejs/kit').Adapter} */ | ||
@@ -33,3 +33,4 @@ const adapter = { | ||
const buildOptions = await options.esbuild({ | ||
/** @type {BuildOptions} */ | ||
const defaultOptions = { | ||
entryPoints: ['.svelte-kit/netlify/entry.js'], | ||
@@ -40,4 +41,7 @@ outfile: join(functions, 'render/index.js'), | ||
platform: 'node' | ||
}); | ||
}; | ||
const buildOptions = | ||
options && options.esbuild ? await options.esbuild(defaultOptions) : defaultOptions; | ||
await esbuild.build(buildOptions); | ||
@@ -44,0 +48,0 @@ |
{ | ||
"name": "@sveltejs/adapter-netlify", | ||
"version": "1.0.0-next.24", | ||
"version": "1.0.0-next.25", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
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
14752
137