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

Removing the need for a package json #1261

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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

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