-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kit: Bundle kit in build step (#486)
* kit: Bundle kit in build step * kit: Target es2018 for builds * Bundle production dependencies into SSR build * create-svelte changeset * Simplify vite config
- Loading branch information
Showing
8 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'create-svelte': patch | ||
--- | ||
|
||
create-svelte: bundle production dependencies for SSR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
kit: bundle @sveltejs/kit into built application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import { resolve } from 'path'; | ||
// Consult https://vitejs.dev/config/ to learn about these options | ||
import { join, resolve } from 'path'; | ||
import { readFileSync } from 'fs'; | ||
import { cwd } from 'process'; | ||
|
||
const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'))); | ||
|
||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
resolve: { | ||
alias: { | ||
$components: resolve('src/components') | ||
} | ||
}, | ||
ssr: { | ||
noExternal: Object.keys(pkg.dependencies || {}) | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
import { resolve } from 'path'; | ||
// Consult https://vitejs.dev/config/ to learn about these options | ||
import { join, resolve } from 'path'; | ||
import { readFileSync } from 'fs'; | ||
import { cwd } from 'process'; | ||
|
||
const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'))); | ||
|
||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
resolve: { | ||
alias: { | ||
$common: resolve('src/common'), | ||
$components: resolve('src/components') | ||
} | ||
}, | ||
ssr: { | ||
noExternal: Object.keys(pkg.dependencies || {}) | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import { resolve } from 'path'; | ||
// Consult https://vitejs.dev/config/ to learn about these options | ||
import { join, resolve } from 'path'; | ||
import { readFileSync } from 'fs'; | ||
import { cwd } from 'process'; | ||
|
||
const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'))); | ||
|
||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
resolve: { | ||
alias: { | ||
$components: resolve('src/components') | ||
} | ||
}, | ||
ssr: { | ||
noExternal: Object.keys(pkg.dependencies || {}) | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
// Consult https://vitejs.dev/config/ to learn about these options | ||
import { resolve } from 'path'; | ||
import { join, resolve } from 'path'; | ||
import { readFileSync } from 'fs'; | ||
import { cwd } from 'process'; | ||
|
||
const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'))); | ||
|
||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
resolve: { | ||
alias: { | ||
$components: resolve('src/components') | ||
} | ||
}, | ||
ssr: { | ||
noExternal: Object.keys(pkg.dependencies || {}) | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters