perf: reduce bundle size (#155)

This commit is contained in:
Nolan Lawson 2021-06-28 20:45:35 -07:00 committed by GitHub
parent 50ac48d4c8
commit 2f05ce790d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -189,7 +189,7 @@
"bundlesize": [
{
"path": "./bundle.js",
"maxSize": "41.4 kB",
"maxSize": "41.3 kB",
"compression": "none"
},
{

View File

@ -59,6 +59,13 @@ const baseConfig = {
},
preprocess: preprocessConfig
}),
replace({
preventAssignment: true,
delimiters: ['', ''],
// Reduce bundle size by removing this bit
// https://github.com/sveltejs/svelte/blob/5d82496/src/runtime/internal/Component.ts#L64-L78
'(!customElement)': '(false)'
}),
strip({
include: ['**/*.js', '**/*.svelte'],
functions: [