Skip to content

v0.10.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@bitspittle bitspittle released this 22 Oct 00:11
· 1966 commits to main since this 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:

  1. Open your .kobweb/conf.yaml file
  2. Under the prod: section, add a script: 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.