# Delete files from prod build

**URL:** https://discuss.emberjs.com/t/delete-files-from-prod-build/20199
**Category:** Ember CLI
**Created:** [August 13, 2023, 7:20am UTC](https://discuss.emberjs.com/t/delete-files-from-prod-build/20199 "2023-08-13T07:20:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MR-H0200](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mr-h0200/32/18143_2.png) [@MR-H0200](https://discuss.emberjs.com/u/MR-H0200)
#### Post date: [August 13, 2023, 7:20am UTC](https://discuss.emberjs.com/t/delete-files-from-prod-build/20199/1 "2023-08-13T07:20:07Z")

</div>

Hello all,

How can we remove some addon files from bundling to vendor.js during production build

I already tried this but not working

> [@Remove a particular file/folder from the app tree depends upon the build environment](https://discuss.emberjs.com/t/remove-a-particular-file-folder-from-the-app-tree-depends-upon-the-build-environment/14635):
>
> I’m trying to remove a folder (app/utils/dev) from the app folder during the production build. I tried using broccoli-file-remover to remove the folder from app tree. But it’s not working for some reason frowning appTree = removeFile(appTree, { path: 'app/utils/dev' }); I think app tree will not maintain the app’s folder structure. But, I’m not sure. Any suggestions?

---

<div class="post-metadata">

### Author: ![NullVoxPopuli](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/nullvoxpopuli/32/18691_2.png) [@NullVoxPopuli](https://discuss.emberjs.com/u/NullVoxPopuli)
#### Post date: [August 14, 2023, 2:45am UTC](https://discuss.emberjs.com/t/delete-files-from-prod-build/20199/2 "2023-08-14T02:45:02Z")

</div>

what do you want to move?

For me, the easiest way to remove files is to not import them. This requires using embroider (with all the static flags on), which uses webpack (or vite, depending on your level of adventurousness).

Pre-embroider (webpack/vite), I think it’s too confusing to customize the build, so that’s why I focus on using webpack/vite because the idea of “only pay for what you import” makes a lot of sense to me.
