Releases: adambrgmn/wp-bundler
v4.0.3
Patch Changes
- Skip using wp.element globals (by @adambrgmn in #78)
v4.0.2
Patch Changes
- Use correct ReactDOM global (by @adambrgmn in #75)
v4.0.1
Patch Changes
-
Remove postinstall script (by @adambrgmn in #73)
The postinstall script was a stupid idea from the beginning, causing issues for
yarn
projects.We're better off without it.
v4.0.0
Major Changes
-
Make project esm only (by @adambrgmn in #66)
This project is now esm only. Generally it shouldn't affect you that much. But if you plan on building something on top of wp-bundler, using the exposed interfaces you need to be aware of this fact.
-
Remove ability to call wp-bundler without sub commands (by @adambrgmn in #69)
Previously we allowed calling
wp-bundler
withoutdev
orbuild
sub commands, like it was from v1. This release removes that ability. From now on you must callwp-bundler dev
orwp-bundler build
.
Minor Changes
-
Move away from multibundler setup (by @adambrgmn in #69)
Previously we initiated two separate esbuild process to build the modern and legacy outputs. This meant we had no way to output a good asset loader witouth waiting for both of the outputs to be done and merge them.
With this approach the legacy output is moving into the main process again. Something that will speed up and make out lives much easier in the future.
v3.0.1
Patch Changes
- Update documentation for v3 (by @adambrgmn in #58)
v3.0.0
Major Changes
-
Require minimum node version 14 (by @adambrgmn in #45)
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.
-
Rework cli output (by @adambrgmn in #41)
Previoulsy the cli output was rendered with
ink
andreact
. That was effective and made it easy to make an interactive cli. But I've realized that this is not an interactive cli. I wantwp-bundler
to stay out of your way.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. -
Introduce build & dev sub commands (by @adambrgmn in #35)
Previously
wp-bundler
worked as a single command, without nothing but flags as the arguments.But to cater for future improvements I've choosen to split the command into sub commands – for now
wp-bundler build
for production andwp-bundler dev
for development.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.
Minor Changes
-
Improve handling of react (by @adambrgmn in #56)
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.It also improves how the jsx factory is handled. Previously it used
React.createElement
. But now it instead usingcreateElement
from'@wordpress/element'
. -
Add support for plugins (by @adambrgmn in #48)
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.The only thing you need to do is pass root directory and url to the
AssetLoader::prepare
call in you main entry file:require_once __DIR__ . '/dist/AssetLoader.php'; WPBundler\AssetLoader::prepare(\plugin_dir_path(__FILE__), \plugin_dir_url(__FILE__)); WPBundler\AssetLoader::enqueueAssets('main');
Patch Changes
-
Fix bug where css transforms are not applied (by @adambrgmn in #45)
-
Skip emitting confusing nomodule css (by @adambrgmn in #46)
-
Add improved examples (by @adambrgmn in #49)
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. -
Bundle @wordpress/icons instead of adding it as dependency (by @adambrgmn in #55)
@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. -
Surface errors outside esbuild pipeline (by @adambrgmn in #47)
v2.1.1
Patch Changes
- Remove unused comment when translation is used again (by @adambrgmn in #34)
- Fix default empty string for plural translations (by @adambrgmn in #31)
v2.1.0
Minor Changes
- Load dev script in admin area (by @adambrgmn in #27)
- Add ability to configure wp-bundler with .wp-bundlerrc or wp-bundler.config.json (by @adambrgmn in #24)
v2.0.0
Major Changes
-
Drop tailwind support (by @adambrgmn in #18)
Running tailwind as part of the dev flow took to long. Tailwind needs to run outside of the wp-bundler context.
-
Add proper dev server with reload on change (by @adambrgmn in #21)
This version includes a new dev server. The server is automatically started when running
wp-bundler --watch
.The server will listen for changes to your source files, including
.php
and.twig
files. If a change is detected the page will be reloaded and the changes applied.If a change only affects
.css
-files the page will not be reloaded. Instead all your css will be "hot-reladed" on the page without requiring a refresh.
Minor Changes
- Add env variable support similar to CRA (by @adambrgmn in #22)
- Rewrite postcss plugin (by @adambrgmn in #17)
Patch Changes
- Fix broken translations (by @adambrgmn in #17)
- Improve twig message extraction (by @adambrgmn in #20)
- Fix translations extraction inconsistencies (by @adambrgmn in #15)
- Remove metafile plugin (by @adambrgmn in #17)
- Only run translations plugin on build (by @adambrgmn in #15)
- Fix issue with extracting domains from _n_noop (by @adambrgmn in #21)
- Fix issues in error output (by @adambrgmn in #17)
v1.2.0
Minor Changes
- Extract translations from style.css (by @adambrgmn in #14)
- Extract translations from twig files (by @adambrgmn in #11)
- Extract translator comments when extracting translations (by @adambrgmn in #10)
- Extract translations from PHP files as part of the build step (by @adambrgmn in #10)
Patch Changes
- Ensure uniq references in po(t) files (by @adambrgmn in #8)
- Fix writing out proper po file (by @adambrgmn in #14)
- Emit proper translator comments (by @adambrgmn in #14)
- Properly minify css after postcss (by @adambrgmn in #13)
- Enable ignoring folders for message extraction (by @adambrgmn in #14)
- Fix merging po and pot files (by @adambrgmn in #13)