Skip to content

Rename dist directory to build#150

Merged
g-elwell merged 1 commit intorelease/2.0.0from
feature/rename-dist-build
Sep 12, 2025
Merged

Rename dist directory to build#150
g-elwell merged 1 commit intorelease/2.0.0from
feature/rename-dist-build

Conversation

@g-elwell
Copy link
Member

Description

By default wp-scripts places generated assets in a directory named "build" whilst we've been using "dist" for this purpose.

I discovered that this has a practical impact, as some wp-scripts commands (for example, lint-js) will exclude files in the "build" directory by default, meaning we need special handling to ensure "dist" is excluded if we choose to run these.

Since the 2.0.0 update will require projects to adjust how they enqueue scripts, changing the output directory name at this time to align with wp-scripts seems appropriate.

@g-elwell g-elwell merged commit e681dfc into release/2.0.0 Sep 12, 2025
3 checks passed
g-elwell added a commit that referenced this pull request Oct 16, 2025
* fix: initial testing of webpack config import

* chore: bump version

* chore: make beta version

* fix: remove extrenuous new line

* fix: remove config that is nolonger required

* chore: bump version

* chore: clean up build assets

* chore: update @wordpress/scripts to latest

* chore: rebuild package lock

* chore: rebuild package lock

* 2.0.0-alpha.2

* fix: block copy context and target

* 2.0.0-alpha.3

* fix: allow for big bite block structure builds

* chore: version bump

* fix: ensure block and non-block entrypoints can be built together

* fix: revert changes to entrypoint detection

the entrypoint detection should not care if block entrypoints are present, as these are handled by wp-scripts. it can continue to throw an error provided we catch this in the correct location

* fix: catch errors if non-block entrypoints are not found

* test: update webpack and file system mocks

* test: added example to cover scenario with both

* fix: add seperate example css for frontend

* fix: remove css-loader and minification plugin from rules

* chore: remove css-loader and mini-css-extract-plugin packages

* feat: add initial support for script modules

* fix: re-add eslint and stylelint plugins

* feat: use wp-scripts eslint config

* chore: remove unused plugins

* fix: move import/resolver to correct location in config

* fix: remove unneeded rule

* fix: extend wordpress babel config

* fix: re-add extraneous deps rule

* fix: prevent re-processing js and ts

* chore: remove unused dependencies

* chore: rebuild package-lock

* chore: update node version

* fix: correct file name and format of eslint-config-func

* docs: explain entrypoint and block directory structure

* fix: correctly set WP src path

* chore: update wp packages to latest

* chore: update sass-loader

* chore: bump version

* chore: version bump

* fix: adds context path assignment to webpack configs

* chore: remove debugging

* fix: reassign project path to env var as may be required for single project builds

* fix: set WP_SOURCE_PATH env var before requiring wp-scripts webpack config to allow CSS/JS to build

* fix: ensure WP_SOURCE_PATH is always a relative path

* fix: Remove custom image rules (#145)

* fix: remove custom image rules

* test: update svg import syntax in example site

* chore: version bump

* Set correct path for script modules (#146)

* fix: ensure script module config uses correct source path for project

* chore: version bump

* feat: add eslint import/order rule (#147)

* fix: add stylelint use logical properties rule (#148)

* chore: rename dist directory to build to align with wp-scripts (#150)

* chore: update example site code to fix eslint issues

* test: add integration tests

* chore: apply eslint to source and fix issues

* fix: resolve eslint issues relating to global vars

* chore: add missing deps to package json

* chore: destructure global inside of function to avoid failing test

* chore: remove integration test file

* Revert "chore: remove integration test file"

This reverts commit 2743aed.

* ci: run only cli tests in CI

* fix: remove static config interfering with dynamic aliases

* docs: correct inline links to avoid pointing to wiki

* fix: explicitly use prettier and eslint configs

* test: broaden string matching to prevent terminal formatting issues

* chore: update minimum node version to 22

* docs: update working with your assets doc

* chore: version bump 2.0.0

* docs: add upgrade guide from v1

---------

Co-authored-by: Paul Taylor <paul@bigbite.net>
Co-authored-by: Paul Taylor <ampersarnie@users.noreply.github.com>
Co-authored-by: Paul Taylor <paul.taylor@hey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant