Skip to content

Latest commit

 

History

History
253 lines (146 loc) · 13.5 KB

CHANGELOG.md

File metadata and controls

253 lines (146 loc) · 13.5 KB

gatsby-plugin-twind

1.1.4

1.1.3

Patch Changes

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

1.1.2

Patch Changes

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

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

1.1.1

Patch Changes

  • revert relying on export condition for detection production environment (269fb67d)

1.1.0

Minor Changes

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

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

  • 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

  • update package badges (4527aa91)

  • Updated dependencies [4527aa91]:

    • twind@1.0.0-next.25

1.0.0-next.24

Patch Changes

1.0.0-next.23

Patch Changes

  • use dom sheet during development and hash class names in production (#252)

1.0.0-next.22

Patch Changes

1.0.0-next.21

Patch Changes

  • add gatsby-plugin-twind and example (#250)

  • Updated dependencies [0a2daf0f, 762c5153]:

    • twind@1.0.0-next.21