Skip to content
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: Clean up the build folder via clean-webpack-plugin #23134

Closed
ocean90 opened this issue Jun 14, 2020 · 1 comment · Fixed by #23135
Closed

Scripts: Clean up the build folder via clean-webpack-plugin #23134

ocean90 opened this issue Jun 14, 2020 · 1 comment · Fixed by #23135
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Tool] WP Scripts /packages/scripts [Type] Build Tooling Issues or PRs related to build tooling

Comments

@ocean90
Copy link
Member

ocean90 commented Jun 14, 2020

Is your feature request related to a problem? Please describe.
Currently, when using a webpack config with multiple entry points and removing one, the old build files for the removed entry point remain in the build folder.

Another case is source maps which are created during the watch task but not used in the production builds.

Describe the solution you'd like
The webpack documentation recommends to use the popular clean-webpack-plugin plugin. We'd have to add it as a new dependency and adjust the plugins config to include new CleanWebpackPlugin().

Describe alternatives you've considered
Adding a prebuild npm script which cleans up the folder.

@ocean90 ocean90 added [Type] Build Tooling Issues or PRs related to build tooling [Tool] WP Scripts /packages/scripts labels Jun 14, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 14, 2020
@ocean90
Copy link
Member Author

ocean90 commented Jun 14, 2020

Related to #23127 which renames style.css to style-index.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Tool] WP Scripts /packages/scripts [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant