[next branch] requiring css that imports another assets causes runtime error
See original GitHub issueIs this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
haven’t tried it yet, but it works on the same env, same code, but v1 react-scripts
Which terms did you search for in User Guide?
N/A
Environment
Environment: OS: macOS High Sierra 10.13.2 Node: 8.9.4 Yarn: 1.3.2 npm: 5.6.0 Watchman: Not Found
Packages: (wanted => installed) react: ^16.2.0 => 16.2.0 react-dom: ^16.2.0 => 16.2.0 react-scripts: 2.0.0-next.096703ab => 2.0.0-next.096703ab
Browser: Chrome Version 63.0.3239.132 (Official Build) (64-bit)
Steps to Reproduce
- create new app
yarn add react-slick
import 'slick-carousel/slick/slick-theme.css'
orrequire('slick-carousel/slick/slick-theme.css');
in index.css
Expected Behavior
No runtime error
Actual Behavior
A runtime error
Reproducible Demo
https://github.com/viankakrisna/create-react-app-example/blob/master/src/index.js
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Importing CSS files in Isomorphic React Components
Short answer: It's a node runtime error. Trying to load CSS on the server in isomorphic apps is not a good idea. javascript...
Read more >How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >Caching - webpack
Running our build script, npm run build , with this configuration should produce the following output: ... Asset Size Chunks Chunk Names main....
Read more >The Asset Pipeline - Rails Edge Guides
It also adds the ability to write these assets in other languages and pre-processors such as CoffeeScript, Sass, and ERB. It allows assets...
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
We are aware of that issue, see https://github.com/facebook/create-react-app/issues/3856
Hi,
I’ve same issue with
react-scripts@2.0.0-next.9754a231
. Both regular css and css module have same result.regular css
css module
Here is the reproducible code: https://github.com/jihchi/create-react-app-3852