All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and adheres to Semantic Versioning.
- Fixed babel helpers file being generated with incorrect filename in esm build. [#2082]
- Migrate from
sewing-kit-next
toloom
for building - package build output remains identical. [#2039]
- No updates. Transitive dependency bump.
- Enable type checking in tests and fix type errors. [#2034]
- No updates. Transitive dependency bump.
- Added file exclusion for tests to package.json. [#2005]
- Updated build tooling, types are now compiled with TypeScript 4.3. [#1997]
- Ensure
tsconfig.tsbuildinfo
file is not uploaded to the npm registry. [#1982]
- Update to latest sewing-kit-next for build. Update
types
/typesVersions
fields to point directly into the build folder [#1980]
- Officially supports React
17.x
1969
- No updates. Transitive dependency bump.
- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. #1906
- Removed dependency on tslib, as we no-longer compile with
tsc
. #1829
- Updated multi-build outputs to include mandatory extensions to fix "Module not found" issues reported by ESM supported bundlers #1759
- Remove duplicated metas without mutating the state [#1736](https://github.com/Shopify/quilt/ pull/1736)
- Only render the last meta tag if they have same name or property #1732
- Cleanup tags from DOM when unmounting #1732
- Better ES module support via
<Html />
'sscript
/blockingScripts
accepting atype
property
- Add new build outputs (CommonJS, ESM, esnext, Node) for greater tree-shakability #1698
- Update
HtmlProps
to mark children as optional (same as any React component) and export it (#1661)
- Updated
tslib
dependency to^1.14.1
. #1657
- The
<Script />
components is now exported from@shopify/react-html/server
(#1648) - The
<Style>
has been renamed for<Stylesheet>
and is now exported from@shopify/react-html/server
(#1648)
- New
useInlineStyle
hook to add inline<style>
elements in the head of the document. (#1648) - New
<InlineStyle />
component so you can add inline<style>
elements in the head of the document. (#1648) - Introduced new
inlineStyles
prop on the<Html />
component to render inline<style>
elements in the head of the document. (#1648)
- Update
serialize-javascript@^3.0.0
. Solved an issue when you try to deserialize a non-JSON object by enforcing data to be serialized as a JSON object. (#762)
- Add missing
useLocale
export
- New
useLocale
hook for setting thelang
attribute on HTML
- New
stream
function for returning a streamed HTML response from a React tree (904)
- The
<Preconnect />
component now works for Safari users, at the expense of IE users. (#776)
- Fixed an issue where async components would not be immediately available during server rendering
- Added the missing dependency for
@shopify/react-hydrate
- Updated to integrate with the newest
@shopify/sewing-kit-koa
and@shopify/react-hydrate
packages. There is a single breaking change that is documented in the migration guide. (#762)
- The new features from 8.1.0 are now properly exported (#753)
- Added the
useBodyAttributes
hook and<BodyAttributes />
component to allow setting additional props on thebody
element during server renders. (#748) - Added the
useHtmlAttributes
hook and<HtmlAttributes />
component to allow setting additional props on thebody
element during server renders. (#748)
- Removed the
isServer
option from the constructor forHtmlManager
#682
- The render of your app performed by the
Html
component now provides theHtmlManager
instance, allowing it to access the serializations built up duringextract()
(#655)
useServerDomEffect
now returns a result (#636)
- Fixed
useTitle
,useLink
,useMeta
,usePreconnect
, anduseFavicon
not being exported.
- Fixed an issue where
<HeadUpdater />
would attempt to access browser globals on the server.
This is a significant update that now requires at least React 16.8. You should refer to the detailed migration guide for additional guidance.
- This library now requires at least React 16.8 (#547)
- Removed
Provider
, exported theHtmlContext
context object, exported a newHeadUpdater
component for the client-side, and renamedManager
toHtmlManager
.
- Added hook counterparts for most of the component APIs:
useSerialized
,useTitle
,useLink
,useMeta
,useFavicon
, andusePreconnect
(#547)
- Deferred scripts are now rendered in
<head>
#605
- Removed the
title
andfavicon
props from<Html />
because they did not have any effect on the rendered markup. Developers should include<Title />
and<Favicon />
components themselves instead.
- Fixed an issue where
link
/meta
tags that were identical to previously-added tags would be removed and re-appended todocument.head
#536
- Changed body styles from
display: none
tovisisbility: hidden
while page loads in development. #515
No changes
- Updated
@shopify/react-effect
to the newest version. While this should not have any breaking changes on consumers of this library, it does require you to update your use of@shopify/react-effect
’sextract
function to the latest version, which is a breaking change. #477
- Added metadata components:
AppleHomeScreen
andResponsive
. #481
- Added a
<Preconnect />
component, which deprecates@shopify/react-preconnect
. #479
- Start of Changelog