Cannot import css files in javascript
See original GitHub issueI’m submitting a bug report
- Library Version: 0.17.0
- Operating System: OSX 10.11.6
- Node Version: 6.2.0
- NPM Version: 3.8.9
- Browser: all
- Language: ESNext
Current behavior: I want to import a css file in src/main.js so I write:
import mycss from './mycss.css!text';
But when I au run
I have the following error : “{ Error: ENOENT: no such file or directory, open ‘…/src/mycss.css.js’”
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Cant Import CSS files into React Project - Stack Overflow
js i get following error. i dont know how to resolve it. ERROR in ./node_modules/css-loader!./src/index.
Read more >Solving the React Error: Not Picking Up CSS Style | Pluralsight
This error is generated because the compiler is only able to import files from the src folder. Here, the CSS file is saved...
Read more >External js libraries' css files can't be imported #10522 - GitHub
I have imported react-toastify and when I import it's css file (import ... External js libraries' css files can't be imported #10522.
Read more >How to import CSS in React.js component? - DEV Community
We can import the sass file into our files by using a relative import path. With that method, we can create a directory...
Read more >[Solved]-Cant Import CSS files into React Project-Reactjs
[Solved]-Cant Import CSS files into React Project-Reactjs. Search. score:3. Accepted answer. module: { rules: [ { test: /\.(js|jsx)$/, exclude: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s sad it’s not the same syntax like jspm and webpack… it will be complicate if someday we have to switch to webpack for exemple 😦
You can see an example of that here: https://github.com/aurelia/templating-resources/blob/master/src/css-resource.js#L43