- Generate ESM code when project's
package.jsonindicates"type": "module"(#1800)
- Allow export to succeed when user has not provided a
basetag (#1208) - Update
rollup-plugin-chunksdependency to fix regex routes (#1757) - Fix status code when requesting directory (#1734)
- Restore hashing of all CSS file names (#1716)
- Fixed typings to be compatible with express/polka (#1713)
- Fix bad imports in type definitions (#1709)
Please see the migration guide for details on migrating from Sapper 0.28 to Sapper 0.29.
- Fix scroll position restoration after changing search param with
goto(#1697) - Fix dynamic imports in
client.json browsers that do not support ES modules (#1593) - Change
rel="prefetch"tosapper:prefetch(#1566) - Support Rollup's
perfoption (#1685) - Avoid error in scroll tracking when navigating off-site and then going back (#1592)
- Fix runtime router handling of encoded query parameters (#1620)
- Fix prefetching when clicking quickly back and forth (#1668)
- Numerous TypeScript definition improvements (#1598, #1601, #1603, #1604)
- Improve error message if exporting site with missing
index.svelte(#1390) - Add TypeScript types for the
preloadfunction and itsthiscontext (#1463) - Avoid infinite loop if layout's
preloadcrashes on error page (#1506) - Support extensions with multiple dots (#1513)
- Fix the service worker requesting non-existent file when
emitCss: false(#1559) - Allow multiple occurrences of
%sapper.cspnonce%(#1565) - Fix
preloadlinks in exported sites (#1576) - Ensure CSS is applied to nested route layouts (#1579)
- Support preloading ES6 modules in exported pages (#919)
- Add
errorto$pagestore on error pages (#948) - Add
document.baseURIfallback for legacy browsers (#1034, #1561) - Add CSP nonce to
<style>tag (#1231) - Make CSP nonce available in template (#1248)
- Upgrade shimport to fix legacy browser support (#1544)
- Minify and hash inject_styles.js (#1524)
- Fix support for legacy browsers (#1525)
- Improve performance by preloading
inject_styles.jsscript (#1530) - Fix flash of unstyled content (#1531)
- Fix duplicate CSS injection with both relative and absolute URLs (#1535)
- Fix CSS handling with Rollup when dynamically imported styles are also statically imported elsewhere (#1493)
- Fix CSS handling with Rollup when one route imports another (#1486)
- Fix webpack CSS support (#1454)
- Protect against undefined value in Rollup CSS handling (#1466)
- Reset scroll position to top after
this.redirect()inpreload()(#1470) - Fix inclusion of CSS on error page for Rollup apps (#1472)
- Allow default link behavior when Alt is pressed (#1372)
- Fix various bugs with asset handling (#1446, #1447, #1448)
- Revert change in 0.28.1 to dev reload server when serving over HTTPS (#1453)
- Fix updating styles upon dev mode reloads (#1439)
- Fix race condition with Rollup in dev mode (#1440)
- Follow
<link href>when crawling site during export (#1444)
- Apply source map to stack traces (#117)
- Add support for vanilla Node
httpserver (#923) - Fix exporting server routes that return binary files (#1103)
- Follow
<img src>,<source src>, and<source srcset>when crawling site during export (#1104) - Export
service-worker-index.htmlonly whenservice-worker.jsexists (#1291) - Improved HTTPS support (#1358, #1379)
- Provide TypeScript declarations (#1381)
- Fix creation of CSS files with duplicate content when using Rollup (#1397)
- Improved script
preloadsupport for Rollup (#1415) - Fix hash in CSS filenames with Rollup (#1388)
- Added CSP nonce support for webpack scripts (#1395)
- 🎉 TypeScript support! 🎉
- 🎉 Asset
preloadheaders for Rollup projects 🎉
Please see the migration guide for details on migrating from Sapper 0.27 to Sapper 0.28.
Also:
- Explicitly set
output.exportsto avoid warning from Rollup (#1326) <script>tags will now be loaded with thedeferattribute (#1123)- The
<head>element hydration workaround was removed (#1067) - The files in the generated
service-worker.jsfile are now prefixed with a/(#1244). - The
sapper-noscrollattribute was renamed tosapper:noscroll(#1320) - Fix handling of routes beginning with /client/ (#1142)
- Fix path normalization of chunks on Windows (#1256, #1333)
- Fix CSS splitting when using Rollup 2 (#1306)
- Set
publicPathin webpack server config for benefit offile-loader(#1342) - Detect presence of
preloadat runtime, so we don't need to worry about preprocessors and compiling components when doing so (#1344) - Load
scripttag withdeferattribute in Webpack projects (#1123) - Show a warning for unserializable server-preloaded data (#1304)
- Added a
noscrolloption togoto(#1320)
- Handle errors thrown from session seeding function (#1273)
- Allow
sessionhandler to return a Promise (#740)
- Prevent client-side app from re-rendering over a server-generated error (#710)
- Better handle I/O backpressure when exporting sites (#851, #893)
- In SSR, include
Authorizationheader when including cookies (#880) - In SSR, default to
credentials: 'same-origin'(#881) - Do not restart dev server while it is already restarting (#920)
- Avoid console error in dev mode when reloading page (#981)
- Correctly handle
srcordestbeing the current directory (#1069) - Log details of Rollup errors instead of swallowing them (#1221, #1234)
- Avoid corrupting binary files during build (#1245)
- Fix multiple slugs in a single URL segment (#547)
- Fix erroneously notifying a component's
$pagesubscribers of the upcoming URL upon leaving a route (#633) - Maintain scroll location when refreshing page (#784)
- Support detecting bundler by
*.config.tsfiles (#1005) - When exporting, create regular files instead of directories for page routes ending in
.html(#1043) - Preserve timestamps when copying files during
export(#1110) - Fix issue with scrolling to deeplinks (#1139)
- Fix missing MIME types when serving files from
/client/(#1136)
- Fix vulnerability when serving
/client/...files — Please upgrade! - Revert CSS handling change from 0.27.10
- Fix component styles being duplicated between
client.cssandmain.css(#1076)
- Recheck whether a component has a
preloadwhenever the file changes (#611)
- Enable sourcemaps in dev mode only by default (#590)
- Don't silently ignore unknown options passed to CLI (again) (#729)
- Revert erroring on unknown options passed to CLI, pending upstream bug investigation
- Various fixes for CSS sourcemaps (#421, #537, #808)
- Add
exportoption--entryfor specifying multiple entry points (#749) - Fix paths to component CSS in legacy build (#775)
- Fix exported sites with links to static files (#572)
- Properly update manifest data during changes in dev mode (#713)
- Don't silently ignore unknown options passed to CLI (#729)
- Add
hostvalue topagestore, giving uniform access toreq.headers.host/location.host(#735) - Log uncaught exceptions in server routes (#782)
- Fix default error template (#817)
- Update devalue
- Accommodate Svelte 3.5.0
- Prevent infinite loop if
preloaderrors (#677) - Allow disabling of live reload (#683)
- Let browser handle initial scroll (#331)
- Allow custom route file extensions via
--ext(#632) - Wait for server to restart before attaching debugger (#694)
- Fix export queue (#698)
- Rerun
preloadfunctions when query changes (#701) - Navigate when spread route changes (#688)
- Handle skipped segments (#663)
- Update to Svelte 3
- Slot-based nested routes (#573)
- Make
page,preloadingandsessionstores available to components (#642) - Handle missing/empty refs when exporting (#602)
- Prevent race condition when exporting (#585)
- Fix redirects with base path (#589)
- Add
<link rel="preload">to exported HTML (#568) - Handle deep links that are invalid selectors on initial load (#516)
- Use shared queue for exporting (#604)
- Handle
+character in query string (#618) - Spread routes (#545)
- Fix navigation from
/a/[id]to/b/[id](#610) - Allow
preloadfunctions to return falsy values (#587) - Mount error pages correctly (#620)
- Force refresh on
goto(current_url)(#484) - Fix preloading navigation bug (#532)
- Don't mutate opts.headers (#528)
- Don't crawl hundreds of pages simultaneously (#369)
- Support Rollup 1.0 (#541)
- Include CSS chunks in webpack build info to avoid duplication (#529)
- Fix preload
asfor styles (#530)
- Handle external URLs in
this.redirect(#490) - Strip leading
/from basepath (#495) - Treat duplicate query string parameters as arrays (#497)
- Don't buffer
stdoutandstderr(#305) - Posixify
build_dir(#498) - Use
page[XY]Offsetinstead ofscroll[XY](#480)
- Include lazily-imported CSS in main CSS chunk (#492)
- Make search param decoding spec-compliant (#493)
- Handle async route errors (#488)
- Ignore empty anchors when exporting (#491)
- Clear
errorandstatuson successful render (#477)
- Fix entry point CSS (#471)
- Overhaul internal APIs (#468)
- Remove unused
sapper startandsapper upgrade(#468) - Remove magic environment variables (#469)
- Preserve SSI comments (#470)
- Fix legacy builds (#462)
- Ensure CSS placeholders are overwritten (#462)
- Fix cookies (#460)
- Fix
sapper dev. Oops.
- Ensure launcher does not overwrite a module (#455)
- Prevent server from accidentally importing dev client
- Make paths in generated code relative to project
- Fix
pkg.files
- Move generated files into
__sapper__(#453) - Change default build and export directories to
__sapper__/buildand__sapper__/export(#453)
- Read template from build directory in production
- Inject
nonceattribute ifres.locals.nonceis present (#424) - Prevent service worker caching (#428)
- Consistent caching for HTML responses (#429)
- Add
immutablecache control header for hashed assets (#425) - Handle value-less query string params (#426)
- Update shimport
- Decode
req.paramsandreq.query(#417) - Decode URLs before writing files in
sapper export(#414) - Generate server sourcemaps for Rollup apps in dev mode (#418)
- Better unicode route handling (#347)
- Ignore editor tmp files (#220)
- Ignore clicks an
<a>element withouthref(#235) - Allow routes that are reserved JavaScript words (#315)
- Print out webpack errors (#403)
- Don't include local origin in export redirects (#409)
- Support differential bundling for Rollup apps via a
--legacyflag (#280)
- Bundle missing dependency
- Bugfix
- Fix service worker Rollup build config
- Update
pkg.files
- Add live reloading (#385)
- Print which file is causing build errors/warnings (#371)
- Use
cheap-watchinstead ofchokidar(#364)
- Fix file watching regression in previous version
- Slim down installed package (#363)
- Only set
preloading: trueon navigation, not prefetch (#352) - Provide fallback for missing preload errors (#361)
- Fix exporting with custom basepath (#342)
- Faster
exportwith more explanatory output (#335) - Only blur
activeElementif it exists (#332) - Don't emit
client_info.jsonorserver_info.json(#318)
- Add
ignoreoption (#326)
- Collapse component chains where no intermediate layout component is specified (#312)
- Prevent confusing error when no root layout is specified
- Nested routes (consult migration guide and docs on layouts) (#262)
- Prevent unsafe replacements (#307)
- Route parameters can be qualified with regex characters (#283)
4xx.htmland5xx.htmlare replaced with_error.html(#209)- Treat
foo/index.json.jsandfoo.json.jsas equivalents (#297) - Return a promise from
goto(#270) - Use store when rendering error pages (#293)
- Prevent console errors when visiting an error page (#279)
- Fix
baseUrlsynthesis (#296)
- Fix handling of fatal errors (#289)
- Focus
<body>after navigation (#287) - Fix timing of hot reload updates
- Emit
fatalevent if server crashes (#285) - Emit
stdoutandstderrevents on dev watcher (#285) - Always refresh client assets in dev (#286)
- Correctly initialise rebuild stats
- Make
fatalevents clonable for IPC purposes
- Emit a
basepathevent (#284)
- Reinstate ten-second interval between dev server heartbeats (#276)
- Expose
dev,build,exportandfind_pageAPIs (#272)
- Each app has a single
<App>component. See the migration guide for more information (#157) - Process exits with error code 1 if build/export fails (#208)
- Limit routes with leading dots to
.well-knownURIs (#252) - Allow server routes to sit in front of pages (#236)
- Create launcher file (#240)
- Only keep necessary parts of webpack stats (#251)
- Allow
NODE_ENVto be overridden when building (#241)
- Allow routes to have a leading
.(#243) - Only encode necessary characters in routes (#234)
- Preserve existing
process.envwhen exporting (#245)
- Fix error reporting in
sapper start
- Fix missing service worker (#231)
- Upgrade chokidar, this time with a fix (#227)
- Downgrade chokidar (#212)
- Attach
storeto error pages - Fix sorting edge case (#215)
- Fix server-side
fetchpaths (#207)
- Support mounting on a path (this requires
app/template.htmlto include%sapper.base%) (#180) - Support per-request server-side
Storewith client-side hydration (#178) - Add
this.fetchtopreload, with credentials support (#178) - Exclude sourcemaps from preload links and
<script>block (#204) - Register service worker in
<script>block
- Whoops —
tslibis a runtime dependency
- Stringify clorox output (#197)
- Add
SAPPER_BASEandSAPPER_APPenvironment variables (#181) - Minify template in
sapper build(#15) - Minify all HTML files in
sapper export(#172) - Log exported files (#195)
- Add
--open/-oflag tosapper devandsapper start(#186)
- Fix path to
sapper-dev-client
- Include
distfiles in package
- Include
sapperbin
- Use
devalueinstead ofserialize-javascript, allowingpreloadto return non-POJOs and cyclical/repeated references, but not functions (#112) - Kill child process if webpack crashes (#177)
- Support HMR on remote devices (#165)
- Remove hard-coded port ((#169))
- Allow non-JS files, e.g. TypeScript to be used as entry points and server routes (#57)
- Faster startup (#173)
- Fix route sorting (#175)
- Automatically select available port, or use
--portflag fordevandstart(#169) - Show stats after build/export (#168)
- Various CLI improvements (#170)
- Rename
preloadRoutestoprefetchRoutes(#166)
- Add
sapper startcommand, for running an app built withsapper build(#163)
- Update to webpack 4
- Add
preloadRoutesfunction — secondary routes are no longer automatically preloaded (#160) sapper buildoutputs tobuild,sapper build custom-diroutputs tocustom-dir(#150)sapper exportoutputs toexport,sapper export custom-diroutputs tocustom-dir(#150)- Improved logging (#158)
- URI-encode routes (#103)
- Various performance and stability improvements (#152)
- Prevent client-side navigation to server route (#145)
- Don't serve error page for server route errors (#138)
- Allow dynamic parameters inside route parts (#139)
- Handle webpack assets that are arrays instead of strings (#131)
- Wait for new server to start before broadcasting HMR update (#129)
- Add
hmr-client.jsto package - Wait until first successful client build before creating service-worker.js
- Add missing
tslibdependency
- Restructure app layout (see migration guide) (#126)
- Support
this.redirect(status, location)andthis.error(status, error)inpreloadfunctions (#127) - Add
sapper devcommand - Add
sapper --helpcommand
- Prevent phantom HMR requests in production mode (#114)
- Ignore non-HTML responses when crawling during
export - Build in prod mode for
export
- Handle unspecified type in
sapper export
- Fix
pkg.filesandpkg.bin
- Hydrate on first load, and only on first load (#93)
- Identify clashes between page and server routes (#96)
- Remove Express-specific utilities, for compatbility with Polka et al (#94)
- Return a promise from
initwhen first page has rendered (#99) - Handle invalid hash links (#104)
- Avoid
URLSearchParams(#107) - Don't automatically set
Content-Typefor server routes (#111) - Handle empty query string routes, e.g.
/?(#105)
- Only write service-worker.js to filesystem in dev mode (#90)
%sapper.main%has been replaced with%sapper.scripts%(#86)- Node 6 support (#67)
- Explicitly load css-loader and style-loader (#72)
- DELETE requests are handled with
delexports (#77) - Send preloaded data for first route to client, where possible (#3)
- Expose
prefetchfunction (#61)
- Fix missing
runtime.js
- Move
sapper/runtime/app.jstosapper/runtime.js - Cancel navigation if overtaken by second navigation (#48)
- Store preloaded data, to avoiding double prefetching (#49)
- Pass server request object to
preload(#54) - Nested routes (#55)
- Handle deep links correctly (#44)
- Don't write files to disk in prod mode
- Add
gotofunction (#29) - Don't use
/tmpas destination in Now environments
- Fix streaming bug
- Render main.js back to templates, to allow relative imports (#40)
- Fix nested routes on Windows (#39)
- Rebundle when routes and main.js change (#34)
- Add
Link...preloadheaders for JavaScript assets (#2) - Stream document up to first dynamic content (#19)
- Error if routes clash (#33)
- Posixify path to HMR client
- Posixify import paths, even on Windows (#31)
- Pass
urlto 404 handler
- Create destination directory when building, don't assume it's already there from dev mode
- We have tests now!
- Inject HMR logic in dev mode
- Separate
sapper buildfrom prod server (#21)
- Fix typo
- Use
atime.getTime()andmtime.getTime()instead ofatimeMsandmtimeMs(#11) - Make dest dir before anyone tries to write to it (#18)
- Expose resolved pathname to
sapper/runtime/app.jsas__app__inside main.js
- First public preview