-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Scripts: Filename changes to main.js when ouput-path parameter is added #34239
Comments
There is a similar issue reported related to how entry points are handled with webpack 5: #34236. It looks like the following doesn't work anymore with the latest major version of npx wp-scripts build ./src/frontend/index.js |
The default entry name in webpack is
|
@walbo thank you for sharing the example. It partially works with the default webpack config, in the context of blocks: While it applies changes to the output folder and the JavaScript filename, it doesn't get propagated to CSS chunks. See my related comment for more details: #34264 (comment). |
It looks like #34264 will fix this issue. |
There is |
Description
Related to webpack v5 migration: #33818.
If I add a
output-path
, the build files are renamed tomain.js
andmain.asset.php
. Without the parameter, the filename doesn't change.Step-by-step reproduction instructions
wp-scripts build --entry ./src/index.js --output-path=custom
Environment info
The text was updated successfully, but these errors were encountered: