No cleaning of dist folder before build
See original GitHub issueExpected Behavior
The dist folder should be cleaned before a build
Current Behavior
When you build your app when a dist folder allready exists, all old files which may not be part of the application anymore, still remains in the dist folder and will be part of the new build.
Steps to reproduce the issue
- Build an app with ui5 build
- Delete a file from you app (e.g. a controller/view)
- Build the app again
- Deleted file still part of dist folder
Context
- UI5 Module Version (output of
ui5 --version
when using the CLI):1.5.4
- Node.js Version:
v10.16.0
- npm Version:
6.9.0
- OS/Platform:
Windows 10
- Browser (if relevant):
Chrome
Affected components (if known)
If this behaviour is supposed to be like this, is there a way to clean the dist folder before the execution of the actual build, without using Grunt or something else?
Best Regards Domae
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Clean dist folder before generating a new build - O'Reilly
Clean dist folder before generating a new build Since we generate lot of builds with different hashed filenames, it is a good practice...
Read more >how to config the webpack 5.x to remove the dist folder before ...
I am tried to do this work using this command in the package.json right now: "dev": "rm -rf src/bundle && webpack --mode development...
Read more >Output Management - webpack
In general it's good practice to clean the /dist folder before each build, so that only used files will be generated. Let's take...
Read more >[wp|4] Clean Up. - Medium
Each time we do npm run build the content of dist/ folder will change and we might have files accumulated from previous build....
Read more >clean-webpack-plugin - npm
A webpack plugin to remove/clean your build folder(s).. Latest version: 4.0.0, last published: a year ago. Start using clean-webpack-plugin ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
UI5 CLI v1.9.0 adds the
--clean-dest
parameter. Use it like this:ui5 build --clean-dest
.Thanks @mauriciolauffer for implementing this new feature!
This is a duplicate of https://github.com/SAP/ui5-builder/issues/45.
@mauriciolauffer already implemented the necessary API for the UI5 Builder: https://github.com/SAP/ui5-builder/pull/306. It just needs to be exposed in the CLI.