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

@import windows system path error #14

Closed
fcaballero opened this issue Apr 10, 2015 · 7 comments
Closed

@import windows system path error #14

fcaballero opened this issue Apr 10, 2015 · 7 comments

Comments

@fcaballero
Copy link
Contributor

Hi,
I was testing this out on windows 8 with you example (https://github.com/justin808/bootstrap-sass-loader-example) which did not work, so I was debugging and I got that bootstrap-sass-styles.loader.js produce this:

@import "C:\usr\tech\bootstrap-sass-loader-example\_pre-bootstrap-customizations.scss";
@import "C:\usr\tech\bootstrap-sass-loader-example\node_modules\bootstrap-sass\assets\stylesheets\bootstrap\variables";
$icon-font-path: "node_modules\bootstrap-sass\assets\fonts\bootstrap\";
@import "C:\usr\tech\bootstrap-sass-loader-example\_bootstrap-customizations.scss";
.....
@import "C:\usr\tech\bootstrap-sass-loader-example\_main.scss";

as you can see, that separator "" is not supported in @import CSS at-rule, so when it's compiling I get the next error:

ERROR in ./~/css-loader!./~/sass-loader!./~/bootstrap-sass-loader/bootstrap-sass-styles.loader.js!./bootstrap-sass.config.js
Module build failed: 
module.exports = {
       ^
      File to import not found or unreadable: ./_C:usrtech♂ootstrap-sass-loader-example_pre-bootstrap-customizations.scss
      in C:\usr\tech\bootstrap-sass-loader-example\bootstrap-sass.config.js (line 1, column 9)
 @ ./~/style-loader!./~/css-loader!./~/sass-loader!./~/bootstrap-sass-loader/bootstrap-sass-styles.loader.js!./bootstrap-sass.config.js 4:14-375

You could solve this by returning (probably you could have a better idea):

return source.replace(/\\/g, '/');

Regards,
Fabián

@justin808
Copy link
Member

@fcaballero If you can give me a PR that supports windows, that would be awesome. Please be sure to test on Mac/Linux as well. I'd be happy to incorporate it.

@justin808
Copy link
Member

Looks like some pretty modest changes are needed: http://shapeshed.com/writing-cross-platform-node/

If anybody wants to submit a PR or if at least 5 people would like this, I'll fix this.

@fcaballero
Copy link
Contributor Author

Hi @justin808 I will give you tomorrow the PR ;)

@justin808
Copy link
Member

OK -- super. For the time being, you can reference your repo/branch in your package.json file.

@justin808
Copy link
Member

@fcaballero If you can please test on linux or mac os as well, that would be great. Did you see the test/debug instructions and the https://github.com/justin808/bootstrap-sass-loader-example?

@fcaballero
Copy link
Contributor Author

@justin808 Thanks a lot ;)

@justin808
Copy link
Member

@fcaballero We're having a windows issue on shakacode/bootstrap-loader#4. Any chance that you could give us a hand?

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

No branches or pull requests

2 participants