Webpack needs appropriate loader: `Unexpected token .`
See original GitHub issueHi, using ES6 + Webpack I get the following error when I add require('react-datepicker/dist/react-datepicker.css');
ERROR in ./~/react-datepicker/dist/react-datepicker.css
Module parse failed: /Users/.../node_modules/react-datepicker/dist/react-datepicker.css Line 1: Unexpected token .
You may need an appropriate loader to handle this file type.
| .react-datepicker__tether-element-attached-top .react-datepicker__triangle, .react-datepicker__tether-element-attached-bottom .react-datepicker__triangle, .react-datepicker__year-read-view--down-arrow {
| margin-left: -8px;
| position: absolute;
Has anyone seen this error or know what loader I’m missing?
"webpack": "1.12.11"
"react": "^0.14.7"
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Module parse failed: Unexpected token. You may ... - GitHub
You may need an appropriate loader to handle this file type, currently no loaders ... const createExpoWebpackConfigAsync = require('@expo/webpack-config'); ...
Read more >Module parse failed: Unexpected token - Stack Overflow
Apparently it happened because you have two module properties in the webpack config object. Given JS objects can only hold one value per...
Read more >039;t build with webpack - Material Design for Bootstrap
css 6:3 Module parse failed: Unexpected token (6:3) You may need an appropriate loader to handle this file type, currently no loaders are...
Read more >you may need an appropriate loader to handle this file type react
Hi, using ES6 + Webpack I get the following error when I add require('react-datepicker/dist/react-datepicker.css');. ERROR in ./~/react-datepicker/dist/react- ...
Read more >[Help] Module parse failed: Unexpected token . Babel not ...
npm install and make get many similar errors like the following. ... failed: Unexpected token (64:16) You may need an appropriate loader to ......
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
how did you manage to load the react-datepicker.min.css?
I’m using webpack.config.js loader but doesnt work:
@diffractometer, I think the issue is that your config is set up to read css files from your
src
directory and notnode_modules
where the datepicker stylesheet will live.