v0.10.1
Pre-release
Pre-release
This release is essentially the same as v0.10.0, except that, when you run an export, it now produces final output that has dead code elimination applied to it. You may expect to see anywhere from a 50-75% reduction in your final site's javascript file.
Note that if you have an existing project, you must do the following steps to take advantage of this:
- Open your
.kobweb/conf.yaml
file - Under the
prod:
section, add ascript:
field set to"build/distributions/(yourproject.js)"
For example, if your project was called example
, then your final conf file might look like:
# example/.kobweb/conf.yaml
site:
title: "Example Project"
server:
files:
dev:
contentRoot: "build/processedResources/js/main/public"
script: "build/js/packages/helloworld/kotlin/example.js"
prod:
script: "build/distributions/example.js" # <--- This line is new!
siteRoot: ".kobweb/site"
port: 8080
If you create a new project, e.g. kobweb create site
, then this will already be done for you.