|
1 | 1 | # @fransvilhelm/wp-bundler
|
2 | 2 |
|
| 3 | +## 3.0.0 |
| 4 | + |
| 5 | +### Major Changes |
| 6 | + |
| 7 | +- Require minimum node version 14 (by [@adambrgmn](https://github.com/adambrgmn) in [#45](https://github.com/adambrgmn/wp-bundler/pull/45)) |
| 8 | + |
| 9 | + This was the requirement before as well, though it was not clearly stated. With this release it is more clearly stated that 14.8 is the least requirement. |
| 10 | + |
| 11 | +- Rework cli output (by [@adambrgmn](https://github.com/adambrgmn) in [#41](https://github.com/adambrgmn/wp-bundler/pull/41)) |
| 12 | + |
| 13 | + Previoulsy the cli output was rendered with `ink` and `react`. That was effective and made it easy to make an interactive cli. But I've realized that this is not an interactive cli. I want `wp-bundler` to stay out of your way. |
| 14 | + |
| 15 | + This rework means that the cli is no longer rendered with ink. Instead the output is regular `console.log`'s. This also has the benefit of working in non interactive cli environments as well. |
| 16 | + |
| 17 | +- Introduce build & dev sub commands (by [@adambrgmn](https://github.com/adambrgmn) in [#35](https://github.com/adambrgmn/wp-bundler/pull/35)) |
| 18 | + |
| 19 | + Previously `wp-bundler` worked as a single command, without nothing but flags as the arguments. |
| 20 | + |
| 21 | + But to cater for future improvements I've choosen to split the command into sub commands – for now `wp-bundler build` for production and `wp-bundler dev` for development. |
| 22 | + |
| 23 | + The old behaviour is still around, but is marked as deprecated and is not recommended for new projects. It will be removed in the next major release. |
| 24 | + |
| 25 | +### Minor Changes |
| 26 | + |
| 27 | +- Improve handling of react (by [@adambrgmn](https://github.com/adambrgmn) in [#56](https://github.com/adambrgmn/wp-bundler/pull/56)) |
| 28 | + |
| 29 | + Previously we relied on React being imported every time you wanted to use jsx (`import React from 'react';`). But with this change the jsx factory is injected when needed and you no longer have to import react. |
| 30 | + |
| 31 | + It also improves how the jsx factory is handled. Previously it used `React.createElement`. But now it instead using `createElement` from `'@wordpress/element'`. |
| 32 | + |
| 33 | +- Add support for plugins (by [@adambrgmn](https://github.com/adambrgmn) in [#48](https://github.com/adambrgmn/wp-bundler/pull/48)) |
| 34 | + |
| 35 | + This builder wasn't supported by plugins before since the generated `AssetLoader` included some functions tied to specific themes. But with this relase the bundler also supports plugins. |
| 36 | + |
| 37 | + The only thing you need to do is pass root directory and url to the `AssetLoader::prepare` call in you main entry file: |
| 38 | + |
| 39 | + ```php |
| 40 | + require_once __DIR__ . '/dist/AssetLoader.php'; |
| 41 | + |
| 42 | + WPBundler\AssetLoader::prepare(\plugin_dir_path(__FILE__), \plugin_dir_url(__FILE__)); |
| 43 | + WPBundler\AssetLoader::enqueueAssets('main'); |
| 44 | + ``` |
| 45 | + |
| 46 | +### Patch Changes |
| 47 | + |
| 48 | +- Fix bug where css transforms are not applied (by [@adambrgmn](https://github.com/adambrgmn) in [#45](https://github.com/adambrgmn/wp-bundler/pull/45)) |
| 49 | +- Skip emitting confusing nomodule css (by [@adambrgmn](https://github.com/adambrgmn) in [#46](https://github.com/adambrgmn/wp-bundler/pull/46)) |
| 50 | +- Add improved examples (by [@adambrgmn](https://github.com/adambrgmn) in [#49](https://github.com/adambrgmn/wp-bundler/pull/49)) |
| 51 | + |
| 52 | + This release also adds improved examples. The previous example ran in a custom environment without actually using WordPress. These new examples makes use of `@wordpress/env` to spin up a quick WordPress environment. |
| 53 | + |
| 54 | +- Bundle @wordpress/icons instead of adding it as dependency (by [@adambrgmn](https://github.com/adambrgmn) in [#55](https://github.com/adambrgmn/wp-bundler/pull/55)) |
| 55 | + |
| 56 | + @wordpress/icons is treated as an internal packages and is not exposed on `window.wp` as the others. Instead this package should be bundled with the projects source. See #54 for context. |
| 57 | + |
| 58 | +- Surface errors outside esbuild pipeline (by [@adambrgmn](https://github.com/adambrgmn) in [#47](https://github.com/adambrgmn/wp-bundler/pull/47)) |
| 59 | + |
3 | 60 | ## 2.1.1
|
4 | 61 |
|
5 | 62 | ### Patch Changes
|
|
0 commit comments