Skip to content

Latest commit

 

History

History
306 lines (175 loc) · 16.7 KB

CHANGELOG.md

File metadata and controls

306 lines (175 loc) · 16.7 KB

@twind/with-sveltekit

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

  • Updated dependencies [8eb316c6]:
    • @twind/core@1.0.3

1.0.2

Patch Changes

1.0.1

Patch Changes

  • introduce new @twind/core package to prevent issue with existing code that imports from CDNs without a version (4cab9d2f)

  • Updated dependencies [4cab9d2f, 4cab9d2f]:

    • @twind/core@1.0.1

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

  • Updated dependencies [08c66ee8]:
    • twind@1.0.0-next.37

1.0.0-next.36

Patch Changes

1.0.0-next.35

Patch Changes

  • BREAKING: use new @twind/with-sveltekit package name (60db0177)

  • Updated dependencies [009594c6]:

    • twind@1.0.0-next.35

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]:

    • twind@1.0.0-next.33

1.0.0-next.32

Patch Changes

  • Updated dependencies [916e7fb9]:
    • twind@1.0.0-next.32

1.0.0-next.31

Patch Changes

  • Updated dependencies [57405812]:
    • twind@1.0.0-next.31

1.0.0-next.30

Patch Changes

  • Updated dependencies [39001d2a]:
    • twind@1.0.0-next.30

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)
  • update package badges (4527aa91)

  • Updated dependencies [4527aa91]:

    • twind@1.0.0-next.25

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

  • follow sveltkit hooks convention for importing; use dom sheet during development and hash class names in production (#252)

  • Updated dependencies [0478b45f, 83a0195d, 8a4e6ddb, 3c0e3f72]:

    • twind@1.0.0-next.23

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)
  • revert: remove dom sheet (6d50cf5f)

  • Updated dependencies [6d50cf5f]:

    • twind@1.0.0-next.20

1.0.0-next.19

Patch Changes

  • Updated dependencies [1f578c9e]:
    • twind@1.0.0-next.19

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]:

    • twind@1.0.0-next.18

1.0.0-next.17

Patch Changes

  • bump to same version (ca157601)

  • Updated dependencies [ca157601]:

    • twind@1.0.0-next.17

1.0.0-next.14

Patch Changes