React-date-picker: Incompatible with NextJS

Created on 20 Apr 2020  路  3Comments  路  Source: wojtekmaj/react-date-picker

The CSS is directly imported from node_modules. Instead of importing it, you should allow us to import it ourselves. This will allow us to use unpkg.com to include the css file or use our own css parsers.

This also makes the library incompatible with the popular NextJS, here's why:
https://github.com/zeit/next.js/blob/master/errors/css-npm.md

Most helpful comment

For the record, next major version will ship with no styles by default - you'll have to import them by yourself.

All 3 comments

@aladinflux why did you close this issue? I think this is valid.

@matthewLeFevre, import from 'entry.nostyle'

import DatePicker from 'react-date-picker/dist/entry.nostyle'

For the record, next major version will ship with no styles by default - you'll have to import them by yourself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JMS-1 picture JMS-1  路  7Comments

baffleinc picture baffleinc  路  4Comments

leo-iomer picture leo-iomer  路  8Comments

hyxos picture hyxos  路  4Comments

jameskraus picture jameskraus  路  4Comments