Skip to content

Commit

Permalink
Expose Vite plugin as @sveltejs/kit/vite
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed May 27, 2022
1 parent 712b4d8 commit 6f947a6
Show file tree
Hide file tree
Showing 7 changed files with 557 additions and 527 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-carrots-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Expose Vite plugin as @sveltejs/kit/vite
3 changes: 3 additions & 0 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
},
"./hooks": {
"import": "./dist/hooks.js"
},
"./vite": {
"import": "./dist/vite.js"
}
},
"types": "types/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/kit/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export default [
cli: 'src/cli.js',
node: 'src/node/index.js',
'node/polyfills': 'src/node/polyfills.js',
hooks: 'src/hooks.js'
hooks: 'src/hooks.js',
vite: 'src/vite/plugin.js'
},
output: {
dir: 'dist',
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ prog

async function start() {
const svelte_config = await load_config();
const { plugins } = await import('./core/dev/plugin.js');
const { plugins } = await import('./vite/plugin.js');
const vite_config = await svelte_config.kit.vite();

/** @type {import('vite').UserConfig} */
Expand Down
Loading

0 comments on commit 6f947a6

Please sign in to comment.