@sveltejs/kit 1.0.0-next.573 → 1.0.0-next.574

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.573",
3
+ "version": "1.0.0-next.574",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -61,7 +61,7 @@ const enforced_config = {
61
61
 
62
62
  /** @return {import('vite').Plugin[]} */
63
63
  export function sveltekit() {
64
- return [...svelte(), kit()];
64
+ return [...svelte(), ...kit()];
65
65
  }
66
66
 
67
67
  /**
@@ -74,7 +74,7 @@ export function sveltekit() {
74
74
  * - https://rollupjs.org/guide/en/#build-hooks
75
75
  * - https://rollupjs.org/guide/en/#output-generation-hooks
76
76
  *
77
- * @return {import('vite').Plugin}
77
+ * @return {import('vite').Plugin[]}
78
78
  */
79
79
  function kit() {
80
80
  /** @type {import('types').ValidatedConfig} */
@@ -183,8 +183,9 @@ function kit() {
183
183
  // TODO remove this for 1.0
184
184
  check_vite_version();
185
185
 
186
- return {
187
- name: 'vite-plugin-svelte-kit',
186
+ /** @type {import('vite').Plugin} */
187
+ const plugin_build = {
188
+ name: 'vite-plugin-sveltekit-build',
188
189
 
189
190
  /**
190
191
  * Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file.
@@ -539,7 +540,12 @@ function kit() {
539
540
  fs.unlinkSync(`${paths.output_dir}/client/${vite_config.build.manifest}`);
540
541
  fs.unlinkSync(`${paths.output_dir}/server/${vite_config.build.manifest}`);
541
542
  }
542
- },
543
+ }
544
+ };
545
+
546
+ /** @type {import('vite').Plugin} */
547
+ const plugin_middleware = {
548
+ name: 'vite-plugin-sveltekit-middleware',
543
549
 
544
550
  /**
545
551
  * Adds the SvelteKit middleware to do SSR in dev mode.
@@ -557,6 +563,8 @@ function kit() {
557
563
  return preview(vite, vite_config, svelte_config);
558
564
  }
559
565
  };
566
+
567
+ return [plugin_build, plugin_middleware];
560
568
  }
561
569
 
562
570
  function check_vite_version() {