Skip to content

Conversation

@systembugtj
Copy link

__dirname + "/app" won't work well on windows when deal with css-loader, may be css-loader issue. use path.join to let the path friendly on window. It should also work on Mac or linux.

Some related error from windows

ERROR in ./app/styles.css
Module parse failed: D:\tests\react-web-app\app\styles.css Line 1: Unexpected token :
You may need an appropriate loader to handle this file type.
| :global *,
| :global *:after,
| :global *:before {
@ ./app/index.js 11:17-40

ERROR in ./~/normalize.css/normalize.css
Module parse failed: D:\tests\react-web-app\node_modules\normalize.css\normalize.css Line 9: Unexpected token {
You may need an appropriate loader to handle this file type.
| /
|
| html {
| font-family: sans-serif; /
1 /
| -ms-text-size-adjust: 100%; /
2 */
@ ./app/index.js 9:0-24

ERROR in ./app/components/Hello/Hello.css
Module parse failed: D:\tests\react-web-app\app\components\Hello\Hello.css Line 1: Unexpected token .
You may need an appropriate loader to handle this file type.
| .greeting {
| color: #00F;
| }
@ ./app/components/Hello/Hello.js 29:16-38

@systembugtj systembugtj changed the title Fix path issue on winddows, when mix "/" and "\" Fix path issue on winddows, when mix "/" and "\" with css-loader Jan 4, 2016
@systembugtj systembugtj changed the title Fix path issue on winddows, when mix "/" and "\" with css-loader Fix path issue on windows, when mix "/" and "\" with css-loader Jan 4, 2016
__dirname + "/app" won't work well on windows. use path.join to make
sure the path friendly with window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant