Skip to content

Make webpack dirpaths relative #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2023
Merged

Conversation

kevinfodness
Copy link
Member

Fixes a bug whereby the directory paths specified in the webpack config are relative to the calling context instead of the location of the webpack config file itself. This change allows a user to run a wp-scripts build process from somewhere other than the root directory of the plugin, such as in the root of a project (the wp-content directory), like so:

wp-scripts build --config plugins/create-wordpress-plugin/webpack.config.js --webpack-copy-php --webpack-src-dir=plugins/create-wordpress-plugin/blocks

Copy link
Contributor

@stevenslack stevenslack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@kevinfodness kevinfodness merged commit 06f51a0 into develop Jul 5, 2023
@kevinfodness kevinfodness deleted the fix/webpack-relative-paths branch July 5, 2023 15:16
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.

2 participants