Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do use ant.design UI in this project? #76

Open
zkeyword opened this issue Jul 25, 2019 · 1 comment
Open

how do use ant.design UI in this project? #76

zkeyword opened this issue Jul 25, 2019 · 1 comment
Assignees
Labels

Comments

@zkeyword
Copy link

zkeyword commented Jul 25, 2019

I try write it in babal.config.js:

['import', { 'libraryName': 'antd', 'libraryDirectory': 'lib', 'style': 'css' }],

and use:
import { Modal } from 'antd'

but, throw error:

`
/Users/zkeyword/Documents/ssr/node_modules/antd/lib/style/index.css:7
body {
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:718:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)

`

@tiagogm
Copy link

tiagogm commented Aug 26, 2019

Hello!

I'm having a similar issue, I'm trying out the project and I've installed an npm package that imports '.css' files into it's own files.
However the server build throws an error complaining about Unexpected token in the css file.
It seems to be that there is something off in the server webpack config, but still trying to find out.

@manuelbieh manuelbieh self-assigned this Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants