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

fix(lib): respect rollupOptions.input in lib mode #10116

Merged
merged 1 commit into from Sep 19, 2022
Merged

Conversation

lsdsjy
Copy link
Contributor

@lsdsjy lsdsjy commented Sep 14, 2022

Fixes #9086

Description

#7275 introduced a regression which caused rollupOptions.input to be ignored in library mode. Before that, the de facto behaviour in library mode is rollupOptions.input overwriting lib.entry. This PR tweaks the config merging behaviour so that rollupOptions.input is only ignored in SSR mode.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@patak-dev patak-dev added p4-important Violate documented behavior or significantly improves performance (priority) feat: library mode labels Sep 14, 2022
@DrJume
Copy link

DrJume commented Oct 18, 2022

This PR breaks the cypress-vite preprocessor:

Error: Invalid value for option "output.inlineDynamicImports" - multiple inputs are not supported when "output.inlineDynamicImports" is true.
    at error (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
    at getInlineDynamicImports (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23490:16)
    at normalizeOutputOptions (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23392:34)
    at getOutputOptions (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23781:12)
    at getOutputOptionsAndPluginDriver (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23776:12)
    at handleGenerateWrite (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23751:74)
    at Object.write (file:///runner/_work/<project>/node_modules/.pnpm/rollup@2.78.1/node_modules/rollup/dist/es/shared/rollup.js:23721:20)
    at generate (file:///runner/_work/<project>/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:45818:64)
    at doBuild (file:///runner/_work/<project>/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:45826:32)
    at async Module.build (file:///runner/_work/<project>/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:45662:16)
    at async Object.handler (/runner/_work/<project>/node_modules/.pnpm/cypress-vite@1.2.0_vite@3.1.8/node_modules/cypress-vite/dist/index.js:[97](https://github.com/falcondev-it/falcon-cookie/actions/runs/3275806652/jobs/5391101940#step:12:98):21)

@patak-dev
Copy link
Member

@DrJume would you create a new issue so we can properly track the regression?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: library mode p4-important Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build.lib overwrites build.rollupOptions.input in v3
4 participants