next-unused
next-unused copied to clipboard
Dynamic imports not working properly
I can see that there was a previous issue with dynamic imports but that there is now a test and it appears to me that it should be working.
But when trying out unused on my project it still reports back a lot of used files as unused and the only explanation I can find is that dynamic imports are somehow not working like they should.
Here is example code of a dynamic import in my project:
const player = dynamic(() => import("../player/VideoPlayer"), {
ssr: false,
});
And config looks like this:
"next-unused": {
"include": [
"src/"
],
"exclude": [
".test."
],
"entrypoints": [
"src/pages"
]
}
Is there an issue here? Or is there anything obvious that we didn't set up correctly?