Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path issue on windows, when mix "/" and "\" with css-loader #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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