Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Non-required files are somehow being included (and called) in bundle #39

Open
scottmas opened this issue Sep 5, 2019 · 0 comments
Open

Comments

@scottmas
Copy link

scottmas commented Sep 5, 2019

Hey, I've discovered a weird bug likely somewhere deep in the webpack config: I have a dist directory (I'm using Typescript) that occasionally has old non-required files inside of it. My app entry point and all the branches from the entry point never reference the files. In all my years of dev, it has never been a problem having these orphaned files sitting around. No other file is requiring them and all is well and good.

However, somehow these non-required files are being included in my Webpack bundle for Expo web, making my app blow up in weird and obscure ways. When I rm -rf my dist directory and do a fresh Typescript compile on everything, the problem goes away and since the files no longer exist they are excluded from the bundle and my app works again.

There's clearly a workaround here (just clean your dist directory after renaming) but this just seems wrong and problematic to me. Is there some weirdness deep in the webpack config?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant