Ant-design-mobile: Upgrade next.js demo to antd-mobile@2

Created on 19 Dec 2017  ·  2Comments  ·  Source: ant-design/ant-design-mobile

Most helpful comment

The demo loads the antd-mobile.min.css in _document.js.

<link rel='stylesheet' type='text/css' href='//unpkg.com/antd-mobile/dist/antd-mobile.min.css' />

I wonder if there is a way to use modularized antd-mobile ?I have tried, but I got the same error as #2287

Module parse failed: /Users/..../node_modules/normalize.css/normalize.css Unexpected token (12:5)
You may need an appropriate loader to handle this file type.
|  */
| 
| html {
|   line-height: 1.15; /* 1 */
|   -ms-text-size-adjust: 100%; /* 2 */

All 2 comments

The demo loads the antd-mobile.min.css in _document.js.

<link rel='stylesheet' type='text/css' href='//unpkg.com/antd-mobile/dist/antd-mobile.min.css' />

I wonder if there is a way to use modularized antd-mobile ?I have tried, but I got the same error as #2287

Module parse failed: /Users/..../node_modules/normalize.css/normalize.css Unexpected token (12:5)
You may need an appropriate loader to handle this file type.
|  */
| 
| html {
|   line-height: 1.15; /* 1 */
|   -ms-text-size-adjust: 100%; /* 2 */

Same problem!
When I was going to customize the antd-mobile theme.

You may need an appropriate loader to handle this file type.
|  */
|
> html {
|   line-height: 1.15; /* 1 */
|   -ms-text-size-adjust: 100%; /* 2 */

 @ ./node_modules/antd-mobile/lib/style/index.js 3:0-38
 @ ./node_modules/antd-mobile/lib/button/style/index.js
 @ ./pages/index.js
 @ multi ./pages/index.js
Was this page helpful?
0 / 5 - 0 ratings

Related issues

tolg picture tolg  ·  4Comments

alvin198761 picture alvin198761  ·  3Comments

ArtemSerga picture ArtemSerga  ·  3Comments

zhangshuaidan picture zhangshuaidan  ·  3Comments

myLazyProgrammer picture myLazyProgrammer  ·  4Comments