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

Add package.json css export #425

Merged
merged 2 commits into from Dec 2, 2022
Merged

Conversation

buhavon
Copy link
Contributor

@buhavon buhavon commented Dec 2, 2022

Purpose of the Pull Request

Problem

Using vite bundler in a monorepo setup with the disableAutomaticStylesInjection set to true, I was facing an issue where I couldn't import the react-easy-crop.css using a reference to the package, like import 'react-easy-crop/react-easy-crop.css'. Instead I had to import this file from the node_modules, which is not ideal and actually break if the node_modules location change.

Solution

Adding an export statement in the package.json to be able to import the react-easy-crop.css by referencing the package name.

Added export './react-easy-crop.css' to library package.json
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 2, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 04d1cfc:

Sandbox Source
react-easy-crop Configuration

@ValentinH ValentinH added bug Something isn't working patch Increment the patch version when merged labels Dec 2, 2022
@ValentinH ValentinH merged commit 2f18572 into ValentinH:main Dec 2, 2022
@ValentinH
Copy link
Owner

Thank you for the fix and the detailed explanation.

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

🚀 PR was released in v4.6.3 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Dec 2, 2022
@buhavon
Copy link
Contributor Author

buhavon commented Dec 2, 2022

Great ! Thanks for the quick merge.

@buhavon buhavon deleted the addpackage-css-export branch December 2, 2022 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants