react-select: Refused to apply style from 'https://unpkg.com/react-select@2.0.0-alpha.8/dist/react-select.css'
Something has changed on https://unpkg.com/react-select@2.0.0-alpha.8/dist/react-select.css whihc is the official CSS way of rendering react-select. Basically, they deleted the file, or made some change that makes it unavailable right now.
All applications based on react-select, which are using this css file from https://unpkg.com/ are failing right now.
This happened like 30mn ago.
Official workaround:
- Use specific version
https://unpkg.com/react-select@1.2.1/dist/react-select.cssinstead of dynamic onehttps://unpkg.com/react-select/dist/react-select.css(very important to do so, since V2 will be released soon and anyone use the dynamic version will get the v2 instead of v1.2.1)
Workarounds while waiting for an official solution from react-select authors/contributors:
- ~~Use my personal CDN: https://storage.googleapis.com/studylink-loan-advisor/react-select-v1.2.1.min.css (temporary solution, don’t rely on this for long-term solution, only use this if you are in a hurry) see https://github.com/JedWatson/react-select/issues/2452#issuecomment-374762320~~
- Local import
import 'react-select/dist/react-select.css';(or alike, using bower, etc.) - Copy the official CSS file and host it on your own CDN https://raw.githubusercontent.com/JedWatson/react-select/v1.2.1/dist/react-select.min.css
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 22
- Comments: 21 (2 by maintainers)
@jgcmarins Webpack config (in this context, if it helps):
@jgcmarins You didn’t configure your webpack with a plugin that loads CSS files, that’s why.
I can’t guide you through this, though.