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(build): ensure dist file name is correctly inferred #1754

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

LinusBorg
Copy link
Collaborator

@LinusBorg LinusBorg commented Jan 27, 2021

When building a package with a scoped name like:

{
  "name": "@linusborg/my-cool-lib"
}

this will create the following folder structure:

dist/
  |- @linusborg/
    |- my-cool-lib.es.js

But what we want is:

dist/
  |- my-cool-lib.es.js

This PR solves this by stripping the package name's scope before using it as the output filename for rollup.

for scoped packages when building in library mode
@yyx990803 yyx990803 merged commit c2e8806 into vitejs:main Jan 27, 2021
@LinusBorg LinusBorg deleted the linusborg/fix-lib-pkg-name branch January 28, 2021 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants