mirror of
https://github.com/zhigang1992/styled-components.git
synced 2026-04-29 01:35:53 +08:00
Merge pull request #2075 from styled-components/handle-hmr-dispose-cgs
fix build
This commit is contained in:
@@ -42,7 +42,7 @@ const commonPlugins = [
|
||||
commonjs({
|
||||
ignoreGlobal: true,
|
||||
namedExports: {
|
||||
'react-is': ['isValidElementType', 'ForwardRef'],
|
||||
'react-is': ['isElement', 'isValidElementType', 'ForwardRef'],
|
||||
},
|
||||
}),
|
||||
replace({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @flow
|
||||
|
||||
import * as ReactIs from 'react-is';
|
||||
import { isElement } from 'react-is';
|
||||
import getComponentName from './getComponentName';
|
||||
import isFunction from './isFunction';
|
||||
import isPlainObject from './isPlainObject';
|
||||
@@ -61,7 +61,7 @@ export default function flatten(chunk: any, executionContext: ?Object, styleShee
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
/* Warn if not referring styled component */
|
||||
// eslint-disable-next-line new-cap
|
||||
if (ReactIs.isElement(new chunk(executionContext))) {
|
||||
if (isElement(new chunk(executionContext))) {
|
||||
console.warn(
|
||||
`${getComponentName(
|
||||
chunk
|
||||
|
||||
Reference in New Issue
Block a user