- do not replace window and document for deno bundles (
5fd4bb08
)
-
create dedicated worker and deno bundles, and downgrade module to es2019 (fixes #426) (
02ea227a
) -
bump @twind/core peerDependency to latest (
a26657cf
)
- revert relying on export condition for detection production environment (
269fb67d
)
- do not use
process.env.NODE_ENV
to detect production environment — instead use import condition (e9d8dccf
)
- Updated dependencies [
8eb316c6
]:- @twind/core@1.0.3
-
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
-
big documentation update (
a63ca2cb
) -
Updated dependencies [
fe891f9c
,a63ca2cb
,e2c17a2e
,d481948b
,a61e0d1d
,e6acbea2
,2ac8e695
,0705e419
]:- twind@1.0.0
- Updated dependencies [
774e2bb4
,a3b1bcba
,0e2aa5c4
,9b5e3297
,0a63948e
,b2b7e40d
,bdc0a7a1
,f74163ba
]:- twind@1.0.0-next.39
- Updated dependencies [
08c66ee8
]:- twind@1.0.0-next.37
- Updated dependencies [
28cbaef5
,43d61076
,80ce410a
,39b45125
,2f8f69d2
,9fc5baec
,aaad7e44
,ae979d12
,fc9b0c27
,346efc4e
,8bbc2a42
,8dfd105b
]:- twind@1.0.0-next.36
- Updated dependencies [
009594c6
]:- twind@1.0.0-next.35
-
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
orstyle
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 newgetSheet(useDOMSheet?: boolean, disableResume?: boolean)
function. This function returns aSheet
for the current environment —virtual
on server, eitherdom
orcssom
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
orextract
: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 possiblevirtual([])
. -
Updated dependencies [
b223e5bb
,92037344
]:- twind@1.0.0-next.33
- Updated dependencies [
916e7fb9
]:- twind@1.0.0-next.32
- Updated dependencies [
57405812
]:- twind@1.0.0-next.31
- Updated dependencies [
39001d2a
]:- twind@1.0.0-next.30
-
fix: ensure sources are included in sourcemap (
bbbbd88e
) -
Updated dependencies [
bbbbd88e
,e8eaae8b
,b526c888
]:- twind@1.0.0-next.27
- Updated dependencies [
bb288434
,063b002b
,966fcb93
,f1fe9a81
,2b91cf29
,49002cac
]:- twind@1.0.0-next.26
- use dom sheet during development and hash class names in production (#252)
-
BREAKING: use gatsby naming convention for plugins (#252)
-
Updated dependencies [
0478b45f
,83a0195d
,8a4e6ddb
,3c0e3f72
]:- twind@1.0.0-next.23