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

feat: make @linaria/shaker optional #819

Merged
merged 1 commit into from Aug 14, 2021
Merged

Conversation

kazuma1989
Copy link
Contributor

Motivation

I want to use Linaria without evaluating the interpolated values. So I don't need to install @linaria/shaker but @linaria/babel-preset requires the package if no evaluator rules are active.

The default evaluator rules will be skipped when any rules option is set. It makes @linaria/shaker optional.

Related #813.

Test plan

A rollup example. This should work without @linaria/shaker installed.

import linaria from '@linaria/rollup';

export default {
  plugins: [
    linaria({
      rules: [],
    }),
  ],
};

@callstack-bot
Copy link

Hey @kazuma1989, thank you for your pull request 🤗.
The coverage report for this branch can be viewed here.

@Anber
Copy link
Collaborator

Anber commented Aug 14, 2021

Thank you @kazuma1989!

@Anber Anber merged commit 2a55b03 into callstack:master Aug 14, 2021
@steffenmllr
Copy link

@Anber any chance this get's published on npm?

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.

None yet

4 participants