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(shaker): improve strategy for namespace imports and side effects #1243

Merged
merged 1 commit into from
May 4, 2023

Conversation

Anber
Copy link
Collaborator

@Anber Anber commented May 4, 2023

Motivation

This pull request addresses the limitations in the existing shaker strategy, specifically in handling namespace imports and side effect imports. It aims to improve the efficiency and accuracy of the shaker process, while also fixing a bug related to file skipping. These enhancements will lead to better code optimization and reduced compile time.

Summary

This PR introduces the following changes:

  1. Improves the search for specific imported values in namespace imports, ensuring that only correct values are identified and imported.
  2. Adds shaker support for side effect imports.
  3. Fixes an issue where certain files were being skipped, ensuring all relevant files are properly processed by the shaker.

Test plan

New tests were added.

@changeset-bot
Copy link

changeset-bot bot commented May 4, 2023

🦋 Changeset detected

Latest commit: 184b179

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

This PR includes changesets to release 23 packages
Name Type
@linaria/react Patch
@linaria/shaker Patch
@linaria/tags Patch
@linaria/utils Patch
@linaria/atomic Patch
linaria Patch
@linaria/testkit Patch
linaria-website Patch
@linaria/babel-preset Patch
vite-example Patch
@linaria/core Patch
@linaria/griffel Patch
@linaria/cli Patch
@linaria/esbuild Patch
@linaria/rollup Patch
@linaria/stylelint Patch
@linaria/vite Patch
esbuild-example Patch
rollup-example Patch
@linaria/webpack4-loader Patch
@linaria/webpack5-loader Patch
vpssr-linaria-solid-example Patch
@linaria/webpack-loader Patch

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

@Anber Anber merged commit 54ab61b into master May 4, 2023
@Anber Anber deleted the shaker-and-side-effects branch May 4, 2023 17:53
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