WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@giulianok
Copy link

The lib requires the consumer to have a valid package.json present in the project since the styles are scoped based on the package's name.

There are cases where a package.json does not exist in a project, for example, tools like Bit.dev don't have (always) available a package.json file (since they are managed internally), making Vanilla Extract unusable.

This proposal allows the user to provide a packageName, which is optional, and defaults to the current behavior.

Alternatives:

  1. Change its name to something more descriptive with more context, like scopeName
  2. Have packageJson options (which can be an object and/or a function that returns an object) where the user can provide a valid package json object. This would be helpful if in the future some other properties of the package json are needed

@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2023

🦋 Changeset detected

Latest commit: 4377658

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@vanilla-extract/esbuild-plugin Minor
@vanilla-extract/jest-transform Minor
@vanilla-extract/webpack-plugin Minor
@vanilla-extract/rollup-plugin Minor
@vanilla-extract/integration Minor
@vanilla-extract/vite-plugin Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant