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.css instead of dynamic one https://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:

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 22
  • Comments: 21 (2 by maintainers)

Most upvoted comments

@jgcmarins Webpack config (in this context, if it helps):

module: {
  rules: [
    ...
    {
      test: /\.css\/,
      use: [{ loader: 'style-loader'}, { loader: 'css-loader' }],
    }
    ...
  ],
},

resolve: {
  ...
  extensions: ['.css']
  ...
}

@jgcmarins You didn’t configure your webpack with a plugin that loads CSS files, that’s why.

You may need an appropriate loader to handle this file type.

I can’t guide you through this, though.