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

Print error file path when using rollupOptions.output.dir #9110

Closed
7 tasks done
qmhc opened this issue Jul 14, 2022 · 0 comments · Fixed by #9111
Closed
7 tasks done

Print error file path when using rollupOptions.output.dir #9110

qmhc opened this issue Jul 14, 2022 · 0 comments · Fixed by #9111

Comments

@qmhc
Copy link
Contributor

qmhc commented Jul 14, 2022

Describe the bug

When config like following:

import { defineConfig } from 'vite'

export default defineConfig({
  build: {
    lib: {
      entry: 'src/main.ts',
      name: 'Test'
    },
    rollupOptions: {
      input: ['src/main.ts'],
      output: [
        {
          format: 'cjs',
          dir: 'lib'
        },
        {
          format: 'es',
          dir: 'es'
        }
      ]
    }
  }
})

will print like this:

image

The outputs are correct:

image

Reproduction

https://stackblitz.com/edit/vitejs-vite-g26exs?file=package.json

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /bin/yarn
    npm: 7.17.0 - /bin/npm
  npmPackages:
    vite: ^3.0.0 => 3.0.0

Used Package Manager

npm

Logs

No response

Validations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant