question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No cleaning of dist folder before build

See original GitHub issue

Expected 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

  1. Build an app with ui5 build
  2. Delete a file from you app (e.g. a controller/view)
  3. Build the app again
  4. 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RandomBytecommented, Sep 5, 2019

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!

1reaction
RandomBytecommented, Sep 5, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found