diff --git a/package.json b/package.json index 7ace8eb1..e72957a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ant-design/cssinjs", - "version": "0.0.0-alpha.40", + "version": "0.0.0-alpha.41", "description": "Component level cssinjs resolution for antd", "keywords": [ "react", @@ -44,7 +44,7 @@ "@emotion/unitless": "^0.7.5", "classnames": "^2.3.1", "csstype": "^3.0.10", - "rc-util": "^5.18.1", + "rc-util": "^5.24.2", "stylis": "^4.0.13" }, "devDependencies": { @@ -56,6 +56,7 @@ "@types/jest": "^27.4.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", + "@types/responselike": "^1.0.0", "@types/stylis": "^4.0.2", "@umijs/fabric": "^2.0.8", "coveralls": "^3.0.6", diff --git a/src/useStyleRegister.tsx b/src/useStyleRegister.tsx index 9d95d072..55cc61d5 100644 --- a/src/useStyleRegister.tsx +++ b/src/useStyleRegister.tsx @@ -269,9 +269,10 @@ export default function useStyleRegister( animationStatistics = {}; if (isMergedClientSide) { + console.log('Trigger!', styleStr, styleId, ATTR_MARK); const style = updateCSS(styleStr, styleId, { mark: ATTR_MARK, - prepend: true, + prepend: 'queue', }); (style as any)[CSS_IN_JS_INSTANCE] = CSS_IN_JS_INSTANCE_ID; diff --git a/tests/index.spec.tsx b/tests/index.spec.tsx index 2714de30..ed15d8d1 100644 --- a/tests/index.spec.tsx +++ b/tests/index.spec.tsx @@ -389,8 +389,8 @@ describe('csssinjs', () => { const styles = Array.from(document.head.querySelectorAll('style')); expect(styles).toHaveLength(2); - expect(styles[1].innerHTML).toBe('a{color:red;}div{color:blue;}'); - expect(styles[0].innerHTML).toBe( + expect(styles[0].innerHTML).toBe('a{color:red;}div{color:blue;}'); + expect(styles[1].innerHTML).toBe( `.${hash} a{color:red;}.${hash} div{color:blue;}`, ); });