Skip to content

Commit

Permalink
fix(styled): remove unnecessary core-js polyfills (fixes #799)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anber committed Aug 8, 2021
1 parent ff1268f commit 7e06977
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/core/__tests__/detect-core-js.test.js
Expand Up @@ -26,7 +26,9 @@ it('Ensures that package do not include core-js dependency after build', async (
});
const result = await waitForProcess(proc);
// run `DEBUG_CORE_JS=true yarn build:lib` to debug issues with introduced core-js dependency
expect(result).not.toContain('Added following core-js polyfill');
expect(result).not.toContain(
'The corejs3 polyfill added the following polyfills'
);
expect(result).toContain(
'Based on your code and targets, the corejs3 polyfill did not add any polyfill'
);
Expand Down
4 changes: 3 additions & 1 deletion packages/react/__tests__/detect-core-js.test.js
Expand Up @@ -26,7 +26,9 @@ it('Ensures that package do not include core-js dependency after build', async (
});
const result = await waitForProcess(proc);
// run `DEBUG_CORE_JS=true yarn build:lib` to debug issues with introduced core-js dependency
expect(result).not.toContain('Added following core-js polyfill');
expect(result).not.toContain(
'The corejs3 polyfill added the following polyfills'
);
expect(result).toContain(
'Based on your code and targets, the corejs3 polyfill did not add any polyfill'
);
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/styled.ts
Expand Up @@ -4,7 +4,7 @@
* - injects classNames for the returned component
* - injects CSS variables used to define dynamic styles based on props
*/
import * as React from 'react';
import React from 'react';
import validAttr from '@emotion/is-prop-valid';
import { cx } from '@linaria/core';
import type { CSSProperties, StyledMeta } from '@linaria/core';
Expand Down

0 comments on commit 7e06977

Please sign in to comment.