You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2023. It is now read-only.
Then, in your Babel configuration (which should be under the `babel` key of your `package.json`), set this package as the babel preset you’d like to use:
24
25
25
26
```json
26
27
{
27
28
"babel": {
28
-
"presets": ["babel-preset-shopify/web"]
29
+
"presets": ["@shopify/babel-preset/web"]
29
30
}
30
31
}
31
32
```
@@ -34,9 +35,9 @@ Then, in your Babel configuration (which should be under the `babel` key of your
34
35
35
36
This packages comes with several different presets for you to use, depending on your project:
36
37
37
-
-`babel-preset-shopify`: The same as `babel-preset-shopify/web`.
38
+
-`@shopify/babel-preset`: The same as `@shopify/babel-preset/web`.
38
39
39
-
-`babel-preset-shopify/web`: A preset to use for JavaScript that is meant to run in browsers. It compiles down features to only those supported by browsers that you have specified in your [browserslist config](https://github.com/browserslist/browserslist). Note that many modern JavaScript features, like `Map`s, `Set`s, `for of` loops, and more, require runtime polyfills (we recommend [`@shopify/polyfills`](https://github.com/Shopify/quilt/tree/master/packages/polyfills), as our `web` and `node` configs will reduce these imports to the set of features needed to polyfill your target environment).
40
+
-`@shopify/babel-preset/web`: A preset to use for JavaScript that is meant to run in browsers. It compiles down features to only those supported by browsers that you have specified in your [browserslist config](https://github.com/browserslist/browserslist). Note that many modern JavaScript features, like `Map`s, `Set`s, `for of` loops, and more, require runtime polyfills (we recommend [`@shopify/polyfills`](https://github.com/Shopify/quilt/tree/master/packages/polyfills), as our `web` and `node` configs will reduce these imports to the set of features needed to polyfill your target environment).
40
41
41
42
This preset accepts an options object. The following options are allowed:
42
43
@@ -46,7 +47,7 @@ This packages comes with several different presets for you to use, depending on
46
47
{
47
48
"babel": {
48
49
"presets": [
49
-
["babel-preset-shopify/web", {"modules": false}]
50
+
["@shopify/babel-preset/web", {"modules": false}]
50
51
]
51
52
}
52
53
}
@@ -58,7 +59,7 @@ This packages comes with several different presets for you to use, depending on
58
59
{
59
60
"babel": {
60
61
"presets": [
61
-
["babel-preset-shopify/web", {
62
+
["@shopify/babel-preset/web", {
62
63
"browsers": ["last 3 versions"]
63
64
}]
64
65
]
@@ -76,13 +77,13 @@ This packages comes with several different presets for you to use, depending on
76
77
77
78
- `useBuiltIns`, a string that is passed to the [`useBuiltIns` option of `@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#usebuiltins)
78
79
79
-
- `babel-preset-shopify/node`: This preset transpiles features to a specified version of Node, defaulting to the currently active version. It accepts an options object. The `modules`, `typescript`, `inlineEnv`,`debug`, `corejs` and `useBuiltIns` options do the same thing they do in `babel-preset-shopify/web`, detailed above. You can also pass a version of Node to target during transpilation using the `version` option:
80
+
- `@shopify/babel-preset/node`: This preset transpiles features to a specified version of Node, defaulting to the currently active version. It accepts an options object. The `modules`, `typescript`, `inlineEnv`,`debug`, `corejs` and `useBuiltIns` options do the same thing they do in `@shopify/babel-preset/web`, detailed above. You can also pass a version of Node to target during transpilation using the `version` option:
80
81
81
82
```json
82
83
{
83
84
"babel": {
84
85
"presets": [
85
-
["babel-preset-shopify/node", {
86
+
["@shopify/babel-preset/node", {
86
87
"modules": false,
87
88
"version": 4
88
89
}]
@@ -91,7 +92,7 @@ This packages comes with several different presets for you to use, depending on
91
92
}
92
93
```
93
94
94
-
-`babel-preset-shopify/react`: Adds plugins that transform React (including JSX). You can use this preset with the `babel-preset-shopify/web` or `babel-preset-shopify/node` configuration.
95
+
-`@shopify/babel-preset/react`: Adds plugins that transform React (including JSX). You can use this preset with the `@shopify/babel-preset/web` or `@shopify/babel-preset/node` configuration.
95
96
96
97
This preset accepts an options object.
97
98
-`hot` : Will automatically add plugins to enable hot reloading of React components. Note that this requires you to have a recent version of `react-hot-loader` installed as a dependency in your project.
@@ -102,7 +103,7 @@ This packages comes with several different presets for you to use, depending on
102
103
{
103
104
"babel": {
104
105
"presets": [
105
-
["babel-preset-shopify/react", {"hot": true}]
106
+
["@shopify/babel-preset/react", {"hot": true}]
106
107
]
107
108
}
108
109
}
@@ -115,8 +116,8 @@ As noted above, you can include multiple of these presets together. Some common
115
116
{
116
117
"babel": {
117
118
"presets": [
118
-
"babel-preset-shopify/web",
119
-
"babel-preset-shopify/react"
119
+
"@shopify/babel-preset/web",
120
+
"@shopify/babel-preset/react"
120
121
]
121
122
}
122
123
}
@@ -125,11 +126,8 @@ As noted above, you can include multiple of these presets together. Some common
0 commit comments