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
Copy file name to clipboardExpand all lines: README.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,7 @@ Backpack is minimalistic build system for Node.js. Inspired by Facebook's [creat
12
12
- Live reload (on saves, add/delete file, etc.)
13
13
- Zero-config, one dependency.
14
14
15
-
HOWEVER, you can configure Backpack to your project's needs. You can [modify the underlying Webpack 2 configuration](#custom-configuration).
16
-
15
+
HOWEVER, you can configure Backpack to your project's needs by extending [the underlying Webpack 2 configuration](#custom-configuration).
17
16
18
17
## How to use
19
18
@@ -50,18 +49,20 @@ Successful builds will show a console like this. *Note: screenshot taken from ru
50
49
51
50
### Custom configuration
52
51
53
-
For custom advanced behavior, you can create a `backpack.config.js` in the root of your project's directory (next to `package.json`). Note: `backpack.config.js` is a regular Node.js module, not a JSON file. It gets used by the Backpack build phase, but does not itself go through babel transformation. So only use JS that's supported by your current Node.js version.
52
+
For custom advanced behavior, you can create a `backpack.config.js` in the root of your project's directory (next to `package.json`).
54
53
55
54
```js
56
55
// backpack.config.js
56
+
// IMPORTANT: This file is not going through babel transformation.
57
+
// You can however use the ES2015 features supported by your Node.js version.
To extend our usage of `babel`, you can define a `.babelrc` file at the root of your app. This file is optional.
85
+
86
+
If found, Backpack will consider it to be the *source of truth*. Thus it must define what Backpack needs as well, which is the `backpack-core/babel` preset.
87
+
88
+
This is designed so that you are not surprised by modifications we could make to the default `babel` configurations.
89
+
90
+
Here's an example `.babelrc` file:
91
+
92
+
```js
93
+
{
94
+
"presets": [
95
+
"backpack-core",
96
+
"stage-0"
97
+
],
98
+
}
99
+
```
100
+
101
+
*Note: This works [exactly like Next.js does](https://github.com/zeit/next.js#customizing-babel-config).*
Copy file name to clipboardExpand all lines: packages/backpack-core/README.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,7 @@ Backpack is minimalistic build system for Node.js. Inspired by Facebook's [creat
12
12
- Live reload (on saves, add/delete file, etc.)
13
13
- Zero-config, one dependency.
14
14
15
-
HOWEVER, you can configure Backpack to your project's needs. You can [modify the underlying Webpack 2 configuration](#custom-configuration).
16
-
15
+
HOWEVER, you can configure Backpack to your project's needs by extending [the underlying Webpack 2 configuration](#custom-configuration).
17
16
18
17
## How to use
19
18
@@ -50,18 +49,20 @@ Successful builds will show a console like this. *Note: screenshot taken from ru
50
49
51
50
### Custom configuration
52
51
53
-
For custom advanced behavior, you can create a `backpack.config.js` in the root of your project's directory (next to `package.json`). Note: `backpack.config.js` is a regular Node.js module, not a JSON file. It gets used by the Backpack build phase, but does not itself go through babel transformation. So only use JS that's supported by your current Node.js version.
52
+
For custom advanced behavior, you can create a `backpack.config.js` in the root of your project's directory (next to `package.json`).
54
53
55
54
```js
56
55
// backpack.config.js
56
+
// IMPORTANT: This file is not going through babel transformation.
57
+
// You can however use the ES2015 features supported by your Node.js version.
To extend our usage of `babel`, you can define a `.babelrc` file at the root of your app. This file is optional.
85
+
86
+
If found, Backpack will consider it to be the *source of truth*. Thus it must define what Backpack needs as well, which is the `backpack-core/babel` preset.
87
+
88
+
This is designed so that you are not surprised by modifications we could make to the default `babel` configurations.
89
+
90
+
Here's an example `.babelrc` file:
91
+
92
+
```js
93
+
{
94
+
"presets": [
95
+
"backpack-core",
96
+
"stage-0"
97
+
],
98
+
}
99
+
```
100
+
101
+
*Note: This works [exactly like Next.js does](https://github.com/zeit/next.js#customizing-babel-config).*
0 commit comments