More details about the option `inlineDependencies`
s3xysteak opened this issue · comments
Describe the change
I had a build error : Inlined implicit external
. And I google it and found a unocss dev issue, which have the similar problem as mine. In the end of the issue it said a commit fixed it:
rollup: {
inlineDependencies: true,
},
I tried it on my project and it fixed it too.
I thought that is a rollup option but I cannot find it. So I think that is a new options of unbuild
. But it do not provide any comments.
Could you provide more details about it? Thank you!
URLs
Line 51 in bfb4a34
Additional information
- Would you be willing to help?
For anyone else experiencing the same warning, create a build.config.ts
file at the root of your project with the following content:
import { defineBuildConfig } from "unbuild"
export default defineBuildConfig({
rollup: {
inlineDependencies: true
}
})
I agree that explaining what this config does would be beneficial 😅
For anyone else experiencing the same warning, create a
build.config.ts
file at the root of your project with the following content:import { defineBuildConfig } from "unbuild" export default defineBuildConfig({ rollup: { inlineDependencies: true } })I agree that explaining what this config does would be beneficial 😅
Are you using alias? I just found out that it missed the case of using an alias, which is one of the reasons that led to this issue. I think maybe I should open a bug issue to talk about it.
@s3xysteak I wasn't!
Turns out I had runtime dependencies that were listed under devDependencies
instead of dependencies
in my package.json
. This triggered the default inlining of those during the build.
Thanks for explaining @edorgeville. @s3xysteak moving this to #398 for single tracker.