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
title: Upgrading from v5 to v6 and Breaking Changes
3
+
order: -2
4
+
shortTitle: Breaking v5 ➡️ v6
5
+
---
6
+
7
+
Version 6 of `@wpackio/scripts` has many improvements. While most of the changes
8
+
are kept as backward compatible, some might break your project. So please take
9
+
note of the followings.
10
+
11
+
## POSTCSS VERSION UPDATE
12
+
13
+
`postcss-loader` has been updated to the very latest and now `postcss` is a
14
+
peer dependency. So after updating you'd either need to install `postcss`
15
+
16
+
```bash
17
+
yarn add postcss --dev
18
+
```
19
+
20
+
Or bootstrap again
21
+
22
+
```bash
23
+
yarn bootstrap
24
+
```
25
+
26
+
For CSS processing to work.
27
+
28
+
## AUTOMATIC WORDPRESS SCRIPTS ALIASING
29
+
30
+
> If you are not using anything from `@wordpress` package, then you are not affected.
31
+
32
+
Starting v6, all modules under `@wordpress` namespace will be automatically
33
+
marked as externals. So when you do something like
34
+
35
+
```js
36
+
import { __ } from'@wordpress/i18n';
37
+
38
+
constgreetings=__('Hello World', 'domain');
39
+
```
40
+
41
+
It will be roughly compiled into
42
+
43
+
```js
44
+
const { __ } =wp.i18n;
45
+
46
+
constgreetings=__('Hello World', 'domain');
47
+
```
48
+
49
+
But it doesn't mean you have to add `wp-i18n` script dependency manually. If you
50
+
are using `wpackio/enqueue` PHP library, then this process is automatic. No code
51
+
change is necessary.
52
+
53
+
We do this by default only for all `@wordpress` namespace packages. We don't do
54
+
this for React, ReactDOM, jQuery or any other scripts.
55
+
56
+
Except when `optimizeForGutenberg` is set to true. Please see [Project Configuration](/apis/project-configuration/#optimizeforgutenberg-boolean) to learn more.
57
+
58
+
## CHANGES IN MANIFEST
59
+
60
+
> If you are not dealing with the manifest file directly, then you are not affected.
61
+
62
+
webpack asset manifest plugin has been updated and it has changed the output
63
+
format. Accordingly `wpackio/enqueue` has also been updated (`v3.0.0`). If you
64
+
are dealing with the manifest directly, then note instead of
0 commit comments