Skip to content

Latest commit

 

History

History
308 lines (176 loc) · 16.7 KB

CHANGELOG.md

File metadata and controls

308 lines (176 loc) · 16.7 KB

@twind/with-sveltekit

1.1.3

1.1.2

Patch Changes

  • do not replace window and document for deno bundles (5fd4bb08)

1.1.1

Patch Changes

  • create dedicated worker and deno bundles, and downgrade module to es2019 (fixes #426) (02ea227a)

  • bump @twind/core peerDependency to latest (a26657cf)

  • enable typedoc for subpath exports (984eb515)

1.1.0

Minor Changes

  • do not use process.env.NODE_ENV to detect production environment — instead use import condition (e9d8dccf)

Patch Changes

  • update vite, vitest, sveltekit, and typescript (5183718b)

  • add worker condition to published package (fixes #418) (5183718b)

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Patch Changes

1.0.0-next.39

Patch Changes

1.0.0-next.38

Patch Changes

1.0.0-next.37

Patch Changes

1.0.0-next.36

Patch Changes

1.0.0-next.35

Patch Changes

1.0.0-next.34

Patch Changes

1.0.0-next.33

Patch Changes

  • server side generated styles are resumed in the browser (b223e5bb)

    Server side generated styles now include resume data that allows twind in the browser to know which styles are already included in the stylesheet. This change significantly reduces the time to interactive, supports hashed classes, and prevents missing classes that have been generated by css or style and are not yet registered.

    Resuming styles is enabled by default for setup (Shim Mode).

    import { setup } from '@twind/core'
    import config from './twind.config'
    
    // styles are resumed!
    setup(config)

    If you want to used the dom sheet during development or if you currently pass a sheet as the second argument, please switch to the new getSheet(useDOMSheet?: boolean, disableResume?: boolean) function. This function returns a Sheet for the current environment — virtual on server, either dom or cssom in browsers.

    import { setup, getSheet } from '@twind/core'
    import config from './twind.config'
    
    setup(config, getSheet(process.env.NODE_ENV != 'production'))

    If you want to use resuming styles with Library Mode you need to adjust your code to use getSheet:

    import { twind, getSheet } from '@twind/core'
    import config from './twind.config'
    
    export const tw = twind(config, getSheet(process.env.NODE_ENV != 'production'))

    To generate server side styles use either inline or extract:

    import { inline, extract } from '@twind/core'
    
    // 1. using inline
    const html = inline(renderApp())
    
    // 2. using extract
    const { html, css } = extract(renderApp())
    // add the css to the head using <style data-twind>{css}</style>

    The signature of virtual(includeResumeData?: boolean) has changed as well. This is technically a breaking change, but I doubt anybody has used the previous possible virtual([]).

  • Updated dependencies [b223e5bb, 92037344]:

1.0.0-next.32

Patch Changes

1.0.0-next.31

Patch Changes

1.0.0-next.30

Patch Changes

1.0.0-next.29

Patch Changes

1.0.0-next.28

Patch Changes

1.0.0-next.27

Patch Changes

1.0.0-next.26

Patch Changes

1.0.0-next.25

Patch Changes

  • switch to process.env.NODE_ENV and typeof document; these seam to work reliable (e82b1630)

1.0.0-next.24

Patch Changes

  • use import.meta.env.DEV and import.meta.env.SSR instead $app/env (6c2f9cc5)

1.0.0-next.23

Patch Changes

1.0.0-next.22

Patch Changes

  • BREAKING: tw accepts only a single string argument (use cx for more feature) this reduces the bundle size for the shim mode by 0.25kb (#251)

1.0.0-next.21

Patch Changes

1.0.0-next.20

Patch Changes

  • perf: optimize observe to only handle changes on element with class attribute (88eeb077)

1.0.0-next.19

Patch Changes

1.0.0-next.18

Patch Changes

  • add inject(html) helper to simplify extracting CSS and injecting it into the head element (#247)

  • Updated dependencies [d3728a92]:

1.0.0-next.17

Patch Changes

1.0.0-next.14

Patch Changes