Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More details about the option inlineDependencies #376

Closed
1 task done
s3xysteak opened this issue Mar 15, 2024 · 4 comments
Closed
1 task done

More details about the option inlineDependencies #376

s3xysteak opened this issue Mar 15, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@s3xysteak
Copy link
Contributor

s3xysteak commented Mar 15, 2024

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

inlineDependencies?: boolean;

Additional information

  • Would you be willing to help?
@s3xysteak s3xysteak added the documentation Improvements or additions to documentation label Mar 15, 2024
@edorgeville
Copy link

edorgeville commented Apr 4, 2024

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 😅

@s3xysteak
Copy link
Contributor Author

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.

@edorgeville
Copy link

@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.

@pi0 pi0 mentioned this issue Jun 4, 2024
8 tasks
@pi0
Copy link
Member

pi0 commented Jun 4, 2024

Thanks for explaining @edorgeville. @s3xysteak moving this to #398 for single tracker.

@pi0 pi0 closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants