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

use with-typescript #4821

Closed
zhangking opened this issue Jul 22, 2018 · 4 comments
Closed

use with-typescript #4821

zhangking opened this issue Jul 22, 2018 · 4 comments

Comments

@zhangking
Copy link

Examples bug report

Example name

with-typescript

Describe the bug

I use with-typescript width babel-plugin-import
my .babelrc file like this

{
  "presets": [
    "next/babel",
    "@zeit/next-typescript/babel"
  ],
  "plugins": [
    [
      "import",
      {
        "libraryName": "antd",
        "libraryDirectory": "es",
        "style": true
      }
    ]
  ],
  "comments": false,
  "compact": "auto"
}

but it does't work

@briefguo
Copy link

#544

@zhangking
Copy link
Author

thanks~ but these examples import all of antd.css , I just want the part of single component. So I set "style": true , but show errors

@goodwinfame
Copy link

@zhangking
add it in your next.config.js

// fix: prevents error when .less files are required by node
if (typeof require !== 'undefined') {
    require.extensions['.less'] = (file) => {}
}

@lock lock bot locked as resolved and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants