When I build my solution, minified JS files have my old lines. Here are my steps:

1 - gulp clean 2 - gulp build 3 - gulp bundle 4 - gulp package-solution --ship

file under \dist\test-web-part.js file under \sharepoint\solution\debug\ClientSideAssets\test-web-part_7b75e81b5de1ea7a45c0575c9bfcde29.js

They both get updated with my old code. I delete these files and they re-created with the old code again. I see old console.log lines in the minified js.

I do not have much experience in SPFX development. Any help would be much appreciated.

  • Hi @Aslan, is there any updates ? Did you try the solution below, if it helps to solve the problem, you could accept as answer so that it could also help other in the forum :)
    – Jerry
    Aug 28, 2020 at 3:47

2 Answers 2


Please see the guide for deploying SPFX solution:

Build And Deploy The Client Side Web Part (SPFx) In SharePoint Online

Should upload the files under project folder - Temp - deploy to the library:

enter image description here

enter image description here


You have to Run bundle with --ship attribute when you need to make a deployment package.The --ship indicates the build tool to build for distribution. So it should be

gulp bundle --ship
gulp package-solution --ship

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.