Nuxt Build Error: [nuxt:tree-shake-composables:transform] Cannot split a chunk that has already been edited
Nuxt Build Error: [nuxt:tree-shake-composables:transform] Cannot split a chunk that has already been edited
After debugging, i found that the affected parts are normally arrow functions (either
async
async
or not) passed into
onMounted
onMounted
Like
onMounted(() => { // Do something})
onMounted(() => { // Do something})
And i had to fix it with
function doSomething() {}onMounted(doSomething)
function doSomething() {}onMounted(doSomething)
Then the build works again!
I think this might be a bug, it could be something inside the arrow function caused the issue or the arrow function itself affected the new build chunking feature