Comments (8)
You will need a style loader and css loader for webpack to be able to import css like that. Docs for importing styles/css can be found at https://webpack.github.io/docs/stylesheets.html.
Alternatively, you can use <link href="https://unpkg.com/[email protected]/style.css">
in your html to pull the styles resource from a CDN. Using a CDN means you would not need to import the style in your code. Note the version in the URL and make sure it matches your version. If you updated the version of this library you are using, you will need to make sure to update the version in the URL as well.
Update: react-block-ui is now on cdnjs: https://cdnjs.com/libraries/react-block-ui You can grab the css from there and even a minified version of the css as well as the SRI links.
from react-block-ui.
@hhh146578 did the comment above address your issue?
from react-block-ui.
I'm closing this issue as it is inactive. If the issue is unresolved, please comment and I will reopen.
from react-block-ui.
I am getting the same error while trying to use react-block-ui with webpack on rails. I've tried to use style.min.js as recommended above with no luck (The minified file has the comment as well). The default webpack config for rails does come with style loader enabled by default. and I am able to import other css files fine. If I remove the comment "" in style.css everything works fine.
from react-block-ui.
There is no style.min.js just a style.css. If your webpack config is only looking for javascript files then you need to either adjust your configuration or include the styles from the cdn.
I would recommend also using create-react-app as it comes out of the box with css import capabilities.
from react-block-ui.
The issue is probably not with webpack config as I am able to load other css files from js files just fine. I am able to import and use the library fine if I remove the comment <!-- CSS Animations -->
on line 51. The syntax for commenting in css files is /* Css Animations */
.
from react-block-ui.
I fixed that comment syntax and will release it when I get to a computer.
from react-block-ui.
@gautambt v1.1.1 has the fix. Please give it a try.
from react-block-ui.
Related Issues (20)
- Cannot find module: 'react-block-ui/redux'. Make sure this package is installed. HOT 3
- Move to availity-react HOT 2
- Could not find type declaration for module react-block-ui HOT 3
- Warning: unstable_flushDiscreteUpdates HOT 25
- Typings problem with tag prop HOT 3
- React 16.9 warning - componentWillReceiveProps HOT 16
- reduxMiddleware examples/documentation wrong? HOT 1
- Doesnโt block responsive design HOT 2
- keepInView start working after scroll HOT 2
- Use Portal for span in BlockUI to prevent validateDomNesting warnings HOT 2
- Unable to improve reduxMiddleware from react-block-ui/reduxMiddleware HOT 2
- Warning | validateDOMNesting For Helper Ref HOT 1
- In combination with MUI and rematch I am getting: Module not found: Can't resolve 'react-block-ui/reduxMiddleware' in HOT 3
- React functional component : can we setState on form load as all components are disabled
- Question - Block only one child in a list HOT 4
- How to change the overlay opacity. HOT 1
- ComponentWillReceiveProps has been renamed, and is not recommended for use. HOT 3
- Cannot use react-block-ui with React 17 HOT 6
- Still able to navigate with tab between inputs and enter data
- Allow passing of aria-label for Accessibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-block-ui.