Next.js: Improve with-ant-design example

Created on 10 Jul 2017  路  5Comments  路  Source: vercel/next.js

It will be great to have customzing default theme sample in ant-design example

Expected Behavior

The way how to do it is described in offical docs
And there is link to more informative article on medium

Current Behavior

Now we have ant-design example with default theme

Steps to Reproduce (for bugs)

I followed the article, but in the end my app is not compiled:
SyntaxError: Invalid or unexpected token

I have created repository based on with-ant-design example with config similar to medium article

##

Need some help with understanding this error and how can I solve it

Most helpful comment

I've been using antd with custom themes taking some config from with-global-stylesheet example.

I set up a repo so you can check my current config: https://github.com/aoc/with-ant-design-custom-theme

hope it helps

All 5 comments

I've been using antd with custom themes taking some config from with-global-stylesheet example.

I set up a repo so you can check my current config: https://github.com/aoc/with-ant-design-custom-theme

hope it helps

@aoc
Hi. great, it works. thank you
I have fixed my example, also I added ExtractTextPlugin, if anybody wants to extract resulting css into seperate file.

how about importing components on demand ?

https://ant.design/docs/react/use-with-create-react-app#Use-babel-plugin-import

@Mantak Does it really work on server-side? I have SyntaxError: Invalid or unexpected token issue that can't be compiled CSS or LESS.

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kenji4569 picture kenji4569  路  3Comments

ghost picture ghost  路  3Comments

jesselee34 picture jesselee34  路  3Comments

YarivGilad picture YarivGilad  路  3Comments

lixiaoyan picture lixiaoyan  路  3Comments