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(css): include inline css module in bundle (fix #6984,#7552) #7591

Merged
merged 1 commit into from Apr 4, 2022

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Apr 3, 2022

Description

This PR fixes #7552.
The issue title mentions SCSS, but it also happens with CSS.

fixes #6984
fixes #7552

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks also for expanding the condition. It is interesting that we have been returning modulesCode even when it is not used, this could potentially fix other issues (like duplicated CSS that esbuild has issues tree-shacking).

We can do it in another PR, but we may want to create a getModulesCode() function so we can call it for the dev branch, but only for the build branch when it is actually going to be needed.

@poyoho
Copy link
Member

poyoho commented Apr 4, 2022

may be there are same with #6996 ? 👀

@sapphi-red
Copy link
Member Author

Oh I failed to find your PR. I think this PR is same with it.
I confirmed that this PR will also fix #6984.

@sapphi-red sapphi-red changed the title fix(css): include inline css module in bundle (fix #7552) fix(css): include inline css module in bundle (fix #6984,#7552) Apr 4, 2022
@patak-dev
Copy link
Member

@poyoho I think we should go with the implementation in this PR. Would you confirm that it covers the case you fixed in #6996? And it would be good if you could PR your test case to this one if you think it will help our CI, so we also get your name here ;)

@poyoho
Copy link
Member

poyoho commented Apr 4, 2022

may be this PR cover my test 😊. so let it forward.

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.

Scss module not in bundle when importing via ?inline Css modules don't work with ?inline in production build
3 participants