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.
- Updated
@babel/*
presets and plugins to version7.13.x
[#222]
- Updated
@babel/*
presets and plugins to version7.13
[#219]
- Improved how options are defined in
@shopify/babel-preset/react
[#209]
- Bugfix for disabling
transformReactConstantElements
[#208]
- Updated
@babel/*
presets and plugins to version7.12
[#207]
- Added the ability to add
@babel/plugin-transform-runtime
[#206]
- Added the ability to disable
@babel/plugin-transform-react-constant-elements
[#205]
- Update
@babel/preset-env
and other babel packages to 7.10.4 and enable preset-env'sbugfixes
option [#172]
- Update
@babel/core
,@babel/preset-env
,@babel/plugin-transform-modules-commonjs
to7.9.6
[#155]
- Remove
react-hot-loader
sincereact-fast-refresh
is now used in sewing-kit [#145]
🚨Package rename
This package has been renamed from babel-preset-shopify
to @shopify/babel-preset
.
Before:
module.exports = {
presets: [['babel-preset-shopify/...']],
};
After:
module.exports = {
presets: [['@shopify/babel-preset/...']],
};
- Added support for null coalescing and optional chaining operators [#48]
- Updated
@babel/core
,@babel/preset-env
, presets, and plugins updated to the latest7.7.x
versions [#47]
- Pass
browsers
web preset config string directly into babel-preset-env's targets option, so that if it is unset we shall read honor browserslist config in package.json / .browserslistrc
- Add
babel-plugin-dynamic-import-node
to the node preset. This was originally added in 19.1.0 then reverted in 19.1.1 as it was a breaking change in some circumstances
- Revert Adding
babel-plugin-dynamic-import-node
to the node preset as this may be a breaking change in some circumstances
- Added
typescript
option to node and web presets to allow babel to read typescript files when set to true. - Added
babel-plugin-dynamic-import-node
to the node preset - Removed
@babel/plugin-proposal-optional-catch-binding
because it is already handled by@babel/preset-env
if you specify an environment where it is needed.
- Added
@babel/plugin-proposal-optional-catch-binding
tonode
andweb
presets
- Switched the default
useBuiltIns
option back toentry
, since it has a smaller bundle impact on large applications
web
preset now accepts auseBuiltIn
value (default =usage
)
node
andweb
presets now accept acorejs
option (default =2
)
node
andweb
presets now useuseBuiltIns: 'usage'
for includingcorejs
polyfills.
- Honor the
envName
defined in your babel config.
- All presets now only work with Babel version 7 or greater.
browsers
are no longer hardcoded to those supported by Shopify’s admin for the purposes of theshopify/web
preset. You must provide a browserslist-compatible configuration within your project, which will be used automatically when running Babel with this preset. Projects can use@shopify/browserslist-config
to get the same support as Shopify’s admin.- The
shopify/web
preset no longer includes plugins for Stage 3 features. The only non-standard features included in this preset are class properties and dynamic imports.
- Removed
shopify/flow
preset since it is no longer used by most projects at Shopify.
- The
shopify/react
preset now accepts apragmaFrag
option for specifying the component to use in JSX fragment expressions.
- Removed
babel-plugin-transform-react-pure-to-component
.
- Updated several babel plugin dependencies:
babel-plugin-transform-inline-environment-variables
0.1.1 => 0.4.3babel-plugin-transform-object-rest-spread
6.23.0 => 6.26.0babel-preset-env
1.5.2 => 1.7.0.
- Switch from Circle CI to Travis.
- Added
publishConfig
to fix deployments.
shopify/react
preset now accepts an additional option,pragma
. Defaults toReact.createElement
.
shopify/web
andshopify/node
now accept an additional option,debug
. When passed, this enablesbabel-preset-env
's debugging to show why transforms are being included in a project. Defaults tofalse
(current behaviour).
- Added
babel-plugin-syntax-dynamic-import
to the web config.
- Added a Babel plugin to remove
testID
props in non-test environments.
- Integrated bugfix from most recent version of
babel-plugin-transform-react-pure-to-component
.
shopify/web
andshopify/node
now correctly default themodules
option to'commonjs'
instead oftrue
.
shopify/react
now includes ahot
option to enable plugins related to hot reloading (react-hot-loader
andreact-pure-to-component
).shopify/react
now includes plugins in development that add additional information for debugging purposes, and plugins in production that offer some performance optimizations.shopify/web
now accepts an additional option,browsers
(an array ofbrowserslist
strings) which specifies what browsers to transpile for (defaults to the browsers supported by Shopify’s admin).
shopify/web
andshopify/node
presets now usebabel-preset-env
to transpile only the features needed for the target environment.- Updated all versions of dependend-on plugins and presets.
- Initial move from combined
javascript
repo.