Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

v1.0.0-alpha.27

Pre-release
Pre-release
Compare
Choose a tag to compare
@t-kelly t-kelly released this 17 Apr 01:40
· 304 commits to master since this release

BREAKING CHANGES

  • #450 Webpack v4. Add template and layout specific JS entrypoints.
  • #488 Add concat-style-loader to handle Liquid Style files. (@t-kelly)

Huge performance improvements for Themes on it's way with the introduction of Webpack 4 and its automatic bundle splitting. This allows Layouts and Templates to have their own independent JS and CSS bundles that are only loaded on the appropriate page(s). Say goodbye to JS and CSS bloat!

You must now include the following in the <head> of any layout file you wish to have JS and CSS. For example, this is what you would put inside the <head> of your layouts/theme.liquid file:

{% include 'script-tags', layout: 'theme' %}
{% include 'style-tags' %}

These snippets are generated automatically by Slate Tools at build. Their contents include <script> and <link> tags for each JS and CSS bundles.

You now must also have a src/assets/scripts/layouts folder and a src/assets/scripts/templates. Any file contained in these folders which have a name the same as their Liquid counterpart is considered an entrypoint. For example, if I create a src/assets/scripts/templates/index.js file, it's contents will only be downloaded and run when a user visits the Index page.

🚀 Enhancement

  • concat-style-loader, slate-tools
    • #488 Add concat-style-loader to handle Liquid Style files. (@t-kelly)
  • slate-sync, slate-tools
  • create-slate-theme, html-webpack-liquid-asset-tags-plugin, slate-analytics, slate-sync, slate-tag-webpack-plugin, slate-tools
    • #450 Webpack v4. Add template and layout specific JS entrypoints.. (@t-kelly)

🐛 Bug Fix

  • slate-config
    • #482 Incorrect type checking when building config objects. (@t-kelly)

📝 Documentation

  • slate-tools
    • #478 Fix typo at packages/slate-tools/README.md. (@jbruni)

🏠 Internal

  • slate-sync, slate-tools
  • slate-babel, slate-common-excludes, slate-tools
    • #473 Remove slate-babel and slate-common-excludes. (@t-kelly)

Committers: 2